%define major 7 %define libname %mklibname %{name} %{major} %define libnamedev %mklibname %{name} -d Summary: Tool suite for Nokia mobile phones Name: gnokii Version: 0.6.31 Release: %mkrel 25 License: GPLv2+ Url: http://www.gnokii.org/ Group: Communications/Mobile Source0: http://www.gnokii.org/download/gnokii/%{name}-%{version}.tar.bz2 Source1: %{name}-smsd.service Source3: %{name}-smsd.sysconfig Source4: %{name}-smsd.logrotate Source5: %{name}-smsd2mail.sh Source6: %{name}-smsd-README.smsd2mail Source7: %{name}-tmpfiles.conf Source11: %{name}-16x16.png Source12: %{name}-32x32.png Source13: %{name}-48x48.png Patch1: %{name}-0.6.8-fix-locking.patch Patch2: %{name}-0.6.31-sqlite3.patch # (cjw) do not declare functions passed to gtk as inline Patch3: %{name}-0.6.31-gcc5.patch Patch4: %{name}-0.6.31-gcc7.patch BuildRequires: pkgconfig(xpm) BuildRequires: gtk+2-devel BuildRequires: bison BuildRequires: pkgconfig(bluez) BuildRequires: pkgconfig(libusb) BuildRequires: mysql-devel BuildRequires: postgresql-devel BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(libpcsclite) BuildRequires: pkgconfig(libical) BuildRequires: readline-devel BuildRequires: gettext-devel BuildRequires: chrpath BuildRequires: intltool Requires(post): systemd >= %{systemd_required_version} Requires(post): rpm-helper >= 0.24.8-1 Requires(preun): rpm-helper >= 0.24.8-1 %description Gnokii is a Linux/Unix tool suite and (eventually) modem/fax driver for Nokia's mobile phones, released under the GPL. %package xgnokii Summary: Graphical Linux/Unix tool suite for Nokia mobile phones Group: Communications/Mobile Requires: %{name} Requires: xdg-utils %description xgnokii Xgnokii is graphical Linux/Unix tool suite for Nokia's mobile phones. It allows you to edit your contacts book, send/read SMS's from/in computer and more other features. %package smsd Summary: Gnokii SMS daemon Group: Communications/Mobile Requires: %{name} = %{version}-%{release} Requires(post): rpm-helper >= 0.24.8-1 Requires(preun): rpm-helper >= 0.24.8-1 %description smsd The Gnokii SMS daemon receives and sends SMS messages. %package smsd-pgsql Summary: PostgreSQL support for Gnokii SMS daemon Group: Communications/Mobile Requires: %{name}-smsd = %{version}-%{release} %description smsd-pgsql %{summary}. %package smsd-mysql Summary: MySQL support for Gnokii SMS daemon Group: Communications/Mobile Requires: %{name}-smsd = %{version}-%{release} %description smsd-mysql %{summary}. %package smsd-sqlite Summary: SQLite support for Gnokii SMS daemon Group: Communications/Mobile Requires: %{name}-smsd = %{version}-%{release} %description smsd-sqlite %{summary}. %package -n %{libname} Summary: Linux/Unix tool suite for Nokia mobile phones Group: System/Libraries %description -n %{libname} Gnokii is a Linux/Unix tool suite and (eventually) modem/fax driver for Nokia's mobile phones, released under the GPL. Libraries %package -n %{libnamedev} Summary: Development libraries and headers for gnokii Group: Development/C Provides: lib%{name}-devel = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Requires: %{libname} = %{version} Obsoletes: %mklibname %{name} -d -s %description -n %{libnamedev} Gnokii is a Linux/Unix tool suite and (eventually) modem/fax driver for Nokia's mobile phones, released under the GPL. Development Libraries. %prep %setup -q %patch1 -p1 -b .lock %patch2 -p1 -b .sqlite %patch3 -p1 -b .inline %patch4 -p1 -b .gcc7 install -pm 644 %{SOURCE5} smsd2mail.sh install -pm 644 %{SOURCE6} README.smsd2mail %build # fix build on aarch64 cp -af %{_rpmconfigdir}/%{_real_vendor}/config.{guess,sub} . %configure --enable-security \ --with-pic \ --enable-libusb \ --disable-static \ --disable-rpath %make_build %make_build -C xgnokii %install %make_install %make_install -C xgnokii # Rename smsd to gnokii-smsd mv %{buildroot}%{_bindir}/{,gnokii-}smsd mv %{buildroot}%{_mandir}/man8/{,gnokii-}smsd.8 sed -i 's,smsd ,gnokii-smsd ,' %{buildroot}%{_mandir}/man8/gnokii-smsd.8 sed -i 's,smsd.,gnokii-smsd.,' %{buildroot}%{_mandir}/man8/gnokii-smsd.8 install -d %{buildroot}%{_sysconfdir} sed 's#/usr/local/sbin/#%{_sbindir}/#' <Docs/sample/gnokiirc >%{buildroot}%{_sysconfdir}/gnokiirc # install the configuration files install -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/gnokii-smsd.service install -D -m 640 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/gnokii-smsd install -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/gnokii-smsd install -D -p -m 0644 %{SOURCE7} %{buildroot}%{_tmpfilesdir}/%{name}.conf install -m644 %{SOURCE11} -D %{buildroot}%{_miconsdir}/x%{name}.png install -m644 %{SOURCE12} -D %{buildroot}%{_iconsdir}/x%{name}.png install -m644 %{SOURCE13} -D %{buildroot}%{_liconsdir}/x%{name}.png # Use last resort to remove -rpath usage that can't be removed from Makefiles chrpath --delete $RPM_BUILD_ROOT%{_bindir}/{gnokii,gnokiid,gnokii-smsd,xgnokii} %find_lang %{name} #we don't want these rm -rf %{buildroot}%{_libdir}/*.la rm -rf %{buildroot}%{_libdir}/smsd/*.la %pre %_pre_groupadd %{name} %post %_tmpfilescreate %{name} %postun %_postun_groupdel %{name} %pre smsd %_pre_useradd gnokii / /sbin/nologin %postun smsd %_postun_userdel gnokii %post smsd %_post_service gnokii-smsd %preun smsd %_preun_service gnokii-smsd %files %doc ChangeLog TODO MAINTAINERS %doc Docs/Bugs Docs/CREDITS Docs/DataCalls-QuickStart %doc Docs/FAQ Docs/gnokii-IrDA-Linux Docs/gnokii-ir-howto %doc Docs/gnokii.nol Docs/KNOWN_BUGS Docs/CodingStyle %doc Docs/gettext-howto Docs/gnokii-hackers-howto %doc Docs/README* Docs/sample Docs/protocol %doc Docs/*.txt %doc utils/*.sis %{_bindir}/%{name} %{_bindir}/sendsms %{_bindir}/%{name}d %{_sbindir}/m%{name}dev %config(noreplace) %{_sysconfdir}/%{name}rc %{_mandir}/man1/gnokii.1* %{_mandir}/man1/sendsms.1* %{_mandir}/man8/gnokiid.8* %{_mandir}/man8/mgnokiidev.8* %{_tmpfilesdir}/%{name}.conf %files xgnokii -f %{name}.lang %{_bindir}/x%{name} %{_datadir}/applications/xgnokii.desktop %{_miconsdir}/x%{name}.png %{_iconsdir}/x%{name}.png %{_liconsdir}/x%{name}.png %{_mandir}/man1/xgnokii* %files smsd %doc smsd/action smsd/ChangeLog smsd/README README.smsd2mail smsd2mail.sh %attr(-,gnokii,gnokii) %config(noreplace) %{_sysconfdir}/sysconfig/gnokii-smsd %config(noreplace) %{_sysconfdir}/logrotate.d/gnokii-smsd %{_unitdir}/gnokii-smsd.service %{_bindir}/gnokii-smsd %{_mandir}/man8/gnokii-smsd.8* %dir %{_libdir}/smsd/ %{_libdir}/smsd/libsmsd_file.so %files smsd-sqlite %{_libdir}/smsd/libsmsd_sqlite.so %files smsd-pgsql %doc smsd/sms.tables.pq.sql %{_libdir}/smsd/libsmsd_pq.so %files smsd-mysql %doc smsd/sms.tables.mysql.sql %{_libdir}/smsd/libsmsd_mysql.so %files -n %{libname} %{_libdir}/*.so.%{major}{,.*} %files -n %{libnamedev} %doc Docs/gnokii-hackers-howto %doc Docs/gettext-howto %doc Docs/protocol %{_includedir}/*.h %{_includedir}/%{name} %{_libdir}/*.so %{_libdir}/pkgconfig/* %changelog * Fri Aug 05 2022 tv <tv> 0.6.31-25.mga9 + Revision: 1875363 - Fix rpath + umeabot <umeabot> - Mageia 9 Mass Rebuild * Tue Aug 25 2020 martinw <martinw> 0.6.31-23.mga8 + Revision: 1618975 - fix build with rpm 4.16 * Sun Mar 01 2020 tv <tv> 0.6.31-22.mga8 + Revision: 1552664 - fix build on aarch64 - fix build by removing call to autoreconf + umeabot <umeabot> - Mageia 8 Mass Rebuild + wally <wally> - replace deprecated %%configure2_5x + luigiwalser <luigiwalser> - rebuild for readline * Sun Sep 23 2018 umeabot <umeabot> 0.6.31-20.mga7 + Revision: 1297947 - Mageia 7 Mass Rebuild * Sat Apr 07 2018 kekepower <kekepower> 0.6.31-19.mga7 + Revision: 1215946 - Rebuild for new libical * Sat Dec 23 2017 wally <wally> 0.6.31-18.mga7 + Revision: 1184224 - rebuild for new mariadb * Sat Sep 30 2017 cjw <cjw> 0.6.31-17.mga7 + Revision: 1162053 - patch6: fix build with gcc 7 * Mon Jan 25 2016 luigiwalser <luigiwalser> 0.6.31-16.mga6 + Revision: 927283 - rebuild for libical * Sat Oct 17 2015 daviddavid <daviddavid> 0.6.31-15.mga6 + Revision: 892432 - add more docs to fix build with latest rpm * Sun Aug 30 2015 cjw <cjw> 0.6.31-14.mga6 + Revision: 871406 - patch5: fix build with gcc 5 * Tue Nov 25 2014 cjw <cjw> 0.6.31-13.mga5 + Revision: 798957 - rebuild against postgresql9.4 * Wed Oct 15 2014 umeabot <umeabot> 0.6.31-12.mga5 + Revision: 741346 - Second Mageia 5 Mass Rebuild * Tue Sep 16 2014 umeabot <umeabot> 0.6.31-11.mga5 + Revision: 679696 - Mageia 5 Mass Rebuild * Sat Jul 05 2014 pterjan <pterjan> 0.6.31-10.mga5 + Revision: 643611 - Replace libusb*-devel BuildRequires by better ones * Sat Oct 19 2013 umeabot <umeabot> 0.6.31-9.mga4 + Revision: 525741 - Mageia 4 Mass Rebuild * Sun Jun 02 2013 fwang <fwang> 0.6.31-8.mga4 + Revision: 434353 - rebuild for new ical * Sun Mar 24 2013 colin <colin> 0.6.31-7.mga3 + Revision: 404859 - Add systemd requires and general post/pre fixes (mga#9302) * Wed Jan 16 2013 colin <colin> 0.6.31-6.mga3 + Revision: 388919 - Drop unused sysvinit script (native systemd unit supplied) - Update lock patch to use /run/lock/gnokkii (direct rather than symlinked) - Use tmpfiles to create lock dir. - Use 775 perms rather than 777 (might cause problems but world writable is DoS positiblity) * Sat Jan 12 2013 umeabot <umeabot> 0.6.31-5.mga3 + Revision: 351952 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Wed Oct 03 2012 malo <malo> 0.6.31-4.mga3 + Revision: 302278 - update RPM group * Sat Apr 28 2012 tmb <tmb> 0.6.31-3.mga2 + Revision: 233714 - Require rpm-helper >= 0.24.8-1 for systemd support * Sun Apr 22 2012 guillomovitch <guillomovitch> 0.6.31-2.mga2 + Revision: 232617 - spec cleanup - systemd support * Sat Dec 03 2011 fwang <fwang> 0.6.31-1.mga2 + Revision: 175314 - fix xgnokii build - br ical - br readline - br pcsclite - new version 0.6.31 * Sun Jun 19 2011 wally <wally> 0.6.30-2.mga2 + Revision: 109792 - create a subpackage for Gnokii SMS daemon SQLite support - add patch to fix SQLite linking - disable static build and obsolete old static devel pkg - drop old obsoletes - clean .spec a bit * Sun Jun 19 2011 kharec <kharec> 0.6.30-1.mga2 + Revision: 109746 - fix file list - new version - fix file list * Thu Mar 24 2011 dmorgan <dmorgan> 0.6.29-5.mga1 + Revision: 77036 - Rebuild for new mysql * Fri Jan 21 2011 ahmad <ahmad> 0.6.29-4.mga1 + Revision: 29467 - drop old/unneeded scriptlets - imported package gnokii