File gammu.spec of Package gammu

# norootforbuild

%define _prefix	/usr
%define rversion 1.10.6
%define rrelease 1.1

Name:           gammu
BuildRequires:  bluez-libs mysql-devel postgresql-devel gettext-devel cmake >= 2.4.0
Version:        %{rversion}
Release:        %{rrelease}OS102DSB
%if %suse_version < 1020
Distribution:	SUSE Linux %(echo "%{suse_version}" | %__sed -e 's/.$//' -e ':a;s/\(.$\)/\.\1/g')
%else
Distribution:	openSUSE %(echo "%{suse_version}" | %__sed -e 's/.$//' -e ':a;s/\(.$\)/\.\1/g')
%endif
AutoReqProv:    on
Packager:	Donnie S Bhayangkara - http://donnie.110mb.com
Group:          Hardware/Mobile
License:        GNU General Public License (GPL)
URL:            http://www.gammu.org
Summary:        Mobile Phone Tools
Source:         %{name}-%{version}.tar.bz2
Patch0:		%{name}-postgresql_path.diff
Patch1:		%{name}-fixinstallpath.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Gammu can do things with cellular phones such as making data calls,
updating the address book, changing calendar and ToDo entries, sending
and receiving SMS messages, loading and getting ring tones and pictures
(different types of logos), synchronizing time, enabling NetMonitor,
managing WAP settings and bookmarks, and much more. Functions depend on
the phone model.

Currently supported phones are:

* Many Nokia phones

* Alcatel BE5 (501/701), BF5 (715)

* Any AT capable phone (Siemens, Nokia, Alcatel, IPAQ, etc)

Another similar tool you might want to check is gnokii.



Authors:
--------
    Marcin Wiacek <marcin@mwiacek.com>

%package devel
Summary:        Development files for Gammu
Group:          Development/Libraries/C and C++
Autoreqprov:    on
Requires:       gammu = %{version}, pkgconfig

%description devel
Gammu can do such things with cellular phones as making data calls,
updating the address book, changing calendar and ToDo entries, sending
and receiving SMS messages, loading and getting ring tones and pictures
(different types of logos), synchronizing time, enabling NetMonitor,
managing WAP settings and bookmarks and much more. Functions depend on
the phone model.

Currently supported phones are:

* Many Nokia phones.

* Alcatel BE5 (501/701), BF5 (715).

* Any AT capable phone (Siemens, Nokia, Alcatel, IPAQ,...).

Another simmilar tool you might want to check is gnokii.



Authors:
--------
    Marcin Wiacek <marcin@mwiacek.com>

%prep
%setup -q
%patch0
%patch1

%build

%__mkdir "%{_builddir}/%{name}-%{version}/build-configure"
cd "%{_builddir}/%{name}-%{version}/build-configure"
cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_BUILD_TYPE=Release -DENABLE_SHARED=ON -DWITH_BACKUP=ON -DINSTALL_BIN_DIR=%{_bindir} -DINSTALL_LIB_DIR=%{_libdir} -DINSTALL_INC_DIR=%{_includedir}/gammu -DINSTALL_LOC_DIR=%{_datadir}/locale -DINSTALL_DOC_DIR=%{_defaultdocdir}/gammu -DINSTALL_MAN_DIR=%{_mandir} && %__make %{?jobs:-j%{jobs}} && %makeinstall

#%install
#%makeinstall

%__sed -i -e 's/\/\/usr\/lib/\/lib/gi' %{buildroot}%{_prefix}/lib/pkgconfig/gammu.pc
%__sed -i -e 's/\/\/usr\/include\/gammu/\/include\/gammu/gi' %{buildroot}%{_prefix}/lib/pkgconfig/gammu.pc

%post
%{run_ldconfig}

%postun
%{run_ldconfig}

%files
%defattr(-,root,root)
%doc docs/* other
%doc %{_mandir}/man1/*
%{_bindir}/*
%{_libdir}/libGammu*so.*
%{_datadir}/locale/*/LC_MESSAGES/gammu.mo

%files devel
%defattr(-,root,root)
%{_includedir}/gammu
%{_libdir}/libGammu*so
#%{_libdir}/libGammu.a
%{_prefix}/lib/pkgconfig/gammu.pc

%clean
%__rm -rf "%{buildroot}"

%changelog
* Tue Jun 5 2007 Donnie S Bhayangkara <dsbhayangkara@gmail.com> 1.10.6
- initial release
- spec file based from openSUSE Factory
openSUSE Build Service is sponsored by