]> git.pld-linux.org Git - packages/gammu.git/blobdiff - gammu.spec
- updated to 1.42.0
[packages/gammu.git] / gammu.spec
index c7cb27b9d4e8b6dad3ae690fdc683f0959a33f68..c0ebbbd8de96470ce2e9c2ddd03f198e7bdadb11 100644 (file)
@@ -1,24 +1,41 @@
-Summary:       GNU tool suite for mobile phones
-Summary(pl.UTF-8):     Zestaw narzędzi GNU dla telefonów komórkowych
+# TODO: gammu-smsd-inject should be in seperate package
+Summary:       Tool suite for mobile phones
+Summary(pl.UTF-8):     Zestaw narzędzi do telefonów komórkowych
 Name:          gammu
-Version:       1.10.0
+Version:       1.42.0
 Release:       1
 Epoch:         1
-License:       GPL v2
+License:       GPL v2+
 Group:         Applications/Communications
-Source0:       http://dl.cihar.com/gammu/releases/%{name}-%{version}.tar.bz2
-# Source0-md5: 05b623c30cfd69ea97f0bc054b19928d
+Source0:       https://dl.cihar.com/gammu/releases/%{name}-%{version}.tar.xz
+# Source0-md5: 552e547864f2367115c165f84f341ee6
+Source1:       %{name}-smsd.init
+Source2:       %{name}-smsd.sysconfig
+Source3:       %{name}.tmpfiles
 Patch0:                %{name}-etc_dir.patch
-Patch1:                %{name}-no_nss.patch
-Patch2:                %{name}-libpq_dir.patch
-URL:           http://www.gammu.org/
-BuildRequires: autoconf
+URL:           https://gammu.eu/
 BuildRequires: bluez-libs-devel
+BuildRequires: cmake >= 3.0
+BuildRequires: curl-devel
+BuildRequires: gcc >= 6:4.7
+BuildRequires: gettext-tools
+BuildRequires: glib2-devel >= 2
+BuildRequires: libdbi-devel
+BuildRequires: libusb-devel >= 1.0
 BuildRequires: mysql-devel
+BuildRequires: pkgconfig
 BuildRequires: postgresql-devel
+BuildRequires: rpmbuild(macros) >= 1.605
+BuildRequires: sqlite3 >= 3
+BuildRequires: systemd-units
+BuildRequires: tar >= 1:1.22
+BuildRequires: udev-glib-devel
+BuildRequires: unixODBC-devel
+BuildRequires: xz >= 1:4.999.7
+Requires:      %{name}-libs = %{epoch}:%{version}-%{release}
+Suggests:      %{name}-smsd = %{epoch}:%{version}-%{release}
 Provides:      mygnokii2
 Obsoletes:     mygnokii2
-Requires:      %{name}-libs = %{epoch}:%{version}-%{release}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -40,17 +57,24 @@ wieloma funkcjami do dzwonków, książki telefonicznej, SMS-ów, logo,
 WAP, daty/czasu, budzika, dzwonienia itp. Może także wykonywać pełne
 kopie zapasowe danych i odtwarzać je.
 
-%package devel
-Summary:       Header files for Gammu tool suite for mobile phones
-Summary(pl.UTF-8):     Pliki nagłówkowe zestawu narzędzi dla telefonów komórkowych Gammu
-Group:         Development/Libraries
+%package smsd
+Summary:       Gammu SMS Daemon
+Summary(pl.UTF-8):     Demon SMS Gammu
+Group:         Applications/Communications
 Requires:      %{name} = %{epoch}:%{version}-%{release}
 
-%description devel
-Header files for Gammu tool suite for mobile phones.
+%description smsd
+Gammu SMS Daemon is a program that periodically scans GSM modem for
+received messages, stores them in defined storage and also sends
+messages enqueued in this storage. It is perfect tool for managing big
+amounts of received or sent messages and automatically process them.
 
-%description devel -l pl.UTF-8
-Pliki nagłówkowe zestawu narzędzi dla telefonów komórkowych Gammu.
+%description smsd -l pl.UTF-8
+Demon SMS Gammu jest programem, który okresowo sprawdza czy modem GSM
+odebrał jakieś wiadomości, przechowuje je w zdefiniowanym zasobie a
+także wysyła wiadomości skolejkowane w tym zasobie. Jest idealnym
+narzędziem do zarządzania dużą ilością otrzymanych lub wysyłanych
+wiadomości i automatycznego przetwarzania ich.
 
 %package libs
 Summary:       Gammu library
@@ -60,96 +84,180 @@ Group:             Libraries
 %description libs
 Gammu tool suite library.
 
-%description devel -l pl.UTF-8
+%description libs -l pl.UTF-8
 Biblioteka zestawu narzędzi dla telefonów komórkowych Gammu.
 
+%package devel
+Summary:       Header files for Gammu tool suite for mobile phones
+Summary(pl.UTF-8):     Pliki nagłówkowe zestawu narzędzi dla telefonów komórkowych Gammu
+Group:         Development/Libraries
+Requires:      %{name}-libs = %{epoch}:%{version}-%{release}
+Requires:      bluez-libs-devel
+
+%description devel
+Header files for Gammu tool suite for mobile phones.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe zestawu narzędzi dla telefonów komórkowych Gammu.
+
 %package static
 Summary:       Gammu static library
 Summary(pl.UTF-8):     Biblioteka statyczna Gammu
 Group:         Development/Libraries
-Requires:      %{name}-libs = %{epoch}:%{version}-%{release}
+Requires:      %{name}-devel = %{epoch}:%{version}-%{release}
 
 %description static
 Gammu static library.
 
-%description devel -l pl.UTF-8
+%description static -l pl.UTF-8
 Biblioteka statyczna zestawu narzędzi dla telefonów komórkowych Gammu.
 
+%package -n bash-completion-gammu
+Summary:       bash-completion for gammu
+Summary(pl.UTF-8):     bashowe uzupełnianie nazw dla gammu
+Group:         Applications/Shells
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+Requires:      bash-completion >= 2.0
+BuildArch:     noarch
+
+%description -n bash-completion-gammu
+This package provides bash-completion for gammu.
+
+%description -n bash-completion-gammu -l pl.UTF-8
+Pakiet ten dostarcza bashowe uzupełnianie nazw dla gammu.
+
 %prep
 %setup -q
-#%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-cp -f VERSION cfg/autoconf/VERSION
-mv docs/docs/english/gammu.1 .
+%patch0 -p1
 
 %build
-cd cfg/autoconf
-%{__autoconf}
-%configure \
-       --disable-static \
-       --without-rpmdir \
-       --enable-cb \
-       --enable-7110incoming \
-       --enable-6210calendar \
-       --with-localedir=%{_datadir}/%{name}
-cd ../..
-%{__make} shared
+install -d build-static
+cd build-static
+%cmake .. \
+       -DBUILD_SHARED_LIBS=OFF \
+       -DINSTALL_LIB_DIR=%{_lib} \
+       -DINSTALL_LIBDATA_DIR=%{_libdir}
+%{__make}
+cd ..
+
+install -d build
+cd build
+%cmake .. \
+       -DBASH_COMPLETION_COMPLETIONSDIR=%{bash_compdir} \
+       -DBUILD_SHARED_LIBS=ON \
+       -DINSTALL_LIB_DIR=%{_lib} \
+       -DINSTALL_LIBDATA_DIR=%{_libdir}
+%{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_examplesdir}/%{name}-%{version},%{_datadir}/%{name}}
-%{__make} installlibonly \
-       DESTDIR=$RPM_BUILD_ROOT \
-       prefix=%{_prefix} \
-       INSTALL_LIB_DIR=%{_libdir} \
-       INSTALL_MAN_DIR=%{_mandir}/man1 \
-       FIND=find
-
-install -D gammu.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
-install docs/examples/config/gammurc $RPM_BUILD_ROOT%{_sysconfdir}
-install docs/docs/locale/*.txt $RPM_BUILD_ROOT%{_datadir}/%{name}
-cp -r docs/{examples,develop} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-cd $RPM_BUILD_ROOT%{_libdir}
-ln -sf libGammu.so.1.0 libGammu.so
-
-rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir}/gammu-smsd,/etc/{rc.d/init.d,sysconfig}} \
+       $RPM_BUILD_ROOT{%{systemdtmpfilesdir},/var/{run,lib}/gammu-smsd} \
+       $RPM_BUILD_ROOT%{_examplesdir}
+
+%{__make} -C build install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+cp -p build-static/libgammu/libGammu.a $RPM_BUILD_ROOT%{_libdir}
+cp -p build-static/smsd/libgsmsd.a $RPM_BUILD_ROOT%{_libdir}
+
+cp -p docs/config/gammurc $RPM_BUILD_ROOT%{_sysconfdir}
+cp -p docs/config/smsdrc $RPM_BUILD_ROOT%{_sysconfdir}/gammu-smsd/ttyS0.conf
+cp -pr docs/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/gammu-smsd
+cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/gammu-smsd
+cp -p %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
+
+%{__mv} $RPM_BUILD_ROOT%{_localedir}/{nb_NO,nb}
+%find_lang %{name}
+%find_lang libgammu
+
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with ldconfig}
-%post   -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
-%endif
+%post  libs -p /sbin/ldconfig
+%postun        libs -p /sbin/ldconfig
+
+%pre smsd
+%groupadd -g 251 gammu-smsd
+%useradd -u 251 -d /var/lib/gammu-smsd -s /bin/false -c "Gammu SMSD user" -G dialout -g gammu-smsd gammu-smsd
+
+%post smsd
+/sbin/chkconfig --add gammu-smsd
+%service gammu-smsd restart "Gammu SMSD"
 
-%files
+%preun smsd
+if [ "$1" = "0" ]; then
+       %service gammu-smsd stop
+       /sbin/chkconfig --del gammu-smsd
+fi
+
+%postun smsd
+if [ "$1" = "0" ]; then
+       %groupremove gammu-smsd
+       %userremove gammu-smsd
+fi
+
+%files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc ChangeLog docs/docs/english/gammu.htm other/bash README
-%doc %lang(it) docs/docs/italian
-%attr(755,root,root) %{_bindir}/%{name}
+%doc ChangeLog README.en_GB docs/manual/Gammu.htm
+%attr(755,root,root) %{_bindir}/gammu
+%attr(755,root,root) %{_bindir}/gammu-detect
+%attr(755,root,root) %{_bindir}/jadmaker
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gammurc
-%dir %{_datadir}/%{name}
-%lang(cs) %{_datadir}/%{name}/gammu_cs.txt
-%lang(de) %{_datadir}/%{name}/gammu_de.txt
-%lang(es) %{_datadir}/%{name}/gammu_es.txt
-%lang(it) %{_datadir}/%{name}/gammu_it.txt
-%lang(pl) %{_datadir}/%{name}/gammu_pl.txt
-%lang(ru) %{_datadir}/%{name}/gammu_ru.txt
-%{_datadir}/%{name}/gammu_us.txt
-%{_examplesdir}/%{name}-%{version}
-%{_mandir}/man1/*
+%{_datadir}/gammu
+%{_mandir}/man1/gammu.1*
+%{_mandir}/man1/gammu-detect.1*
+%{_mandir}/man1/jadmaker.1*
+%{_mandir}/man5/gammu-backup.5*
+%{_mandir}/man5/gammu-smsbackup.5*
+%{_mandir}/man5/gammurc.5*
 
-%files devel
+%files smsd
+%defattr(644,root,root,755)
+%doc docs/sql/*.sql
+%attr(755,root,root) %{_bindir}/gammu-smsd
+%attr(755,root,root) %{_bindir}/gammu-smsd-inject
+%attr(755,root,root) %{_bindir}/gammu-smsd-monitor
+%attr(754,root,root) /etc/rc.d/init.d/gammu-smsd
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/gammu-smsd
+%dir %{_sysconfdir}/gammu-smsd
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gammu-smsd/ttyS0.conf
+%{systemdunitdir}/gammu-smsd.service
+%{systemdtmpfilesdir}/gammu.conf
+%attr(750,root,gammu-smsd) /var/run/gammu-smsd
+%attr(750,gammu-smsd,gammu-smsd) /var/lib/gammu-smsd
+%{_mandir}/man1/gammu-smsd.1*
+%{_mandir}/man1/gammu-smsd-inject.1*
+%{_mandir}/man1/gammu-smsd-monitor.1*
+%{_mandir}/man5/gammu-smsdrc.5*
+%{_mandir}/man7/gammu-smsd-*.7*
+
+%files libs -f libgammu.lang
 %defattr(644,root,root,755)
-%{_libdir}/*.so
-%{_includedir}/*
-%{_pkgconfigdir}/*
+%attr(755,root,root) %{_libdir}/libGammu.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libGammu.so.8
+%attr(755,root,root) %{_libdir}/libgsmsd.so.*.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libgsmsd.so.8
 
-%files libs
-%defattr(755,root,root,755)
-%{_libdir}/*.so.*
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/gammu-config
+%attr(755,root,root) %{_libdir}/libGammu.so
+%attr(755,root,root) %{_libdir}/libgsmsd.so
+%{_includedir}/gammu
+%{_pkgconfigdir}/gammu.pc
+%{_pkgconfigdir}/gammu-smsd.pc
+%{_mandir}/man1/gammu-config.1*
+%{_examplesdir}/%{name}-%{version}
 
 %files static
-%defattr(755,root,root,755)
-%{_libdir}/*.a
+%defattr(644,root,root,755)
+%{_libdir}/libGammu.a
+%{_libdir}/libgsmsd.a
+
+%files -n bash-completion-gammu
+%defattr(644,root,root,755)
+%{bash_compdir}/gammu
This page took 1.237764 seconds and 4 git commands to generate.