From 3fe0b3d8d3e97cc107392a11ee8204496cf32491 Mon Sep 17 00:00:00 2001 From: Sérgio M. Basto Date: May 29 2016 23:30:30 +0000 Subject: A little package review with help of fedora-review --- diff --git a/gammu-1.3.7-udev.patch b/gammu-1.3.7-udev.patch new file mode 100644 index 0000000..a05926a --- /dev/null +++ b/gammu-1.3.7-udev.patch @@ -0,0 +1,13 @@ +--- ./contrib/CMakeLists.txt.orig 2016-05-29 23:11:29.895312586 +0100 ++++ ./contrib/CMakeLists.txt 2016-05-29 23:13:03.784283936 +0100 +@@ -116,8 +116,8 @@ endif (INSTALL_LSB_INIT) + + if (INSTALL_UDEV_RULES) + install ( +- FILES udev/69-gammu-acl.rules +- DESTINATION "/etc/udev/rules.d" ++ FILES udev/69-gammu-acl.rules udev/45-nokiadku2.rules ++ DESTINATION "/usr/lib/udev/rules.d" + COMPONENT "udev" + ) + else (INSTALL_UDEV_RULES) diff --git a/gammu.spec b/gammu.spec index d181481..f1ba39e 100644 --- a/gammu.spec +++ b/gammu.spec @@ -1,12 +1,13 @@ Name: gammu Version: 1.37.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Command Line utility to work with mobile phones Group: Applications/System License: GPLv2+ URL: http://wammu.eu/gammu/ -Source0: https://github.com/gammu/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source0: https://github.com/gammu/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +Patch0: gammu-1.3.7-udev.patch BuildRequires: cmake autoconf pkgconfig BuildRequires: gettext-devel @@ -76,9 +77,7 @@ developing applications that use %{name} %prep %setup -q - -sed -i 's|${INSTALL_LIB_DIR}|%{_libdir}|' CMakeLists.txt libgammu/CMakeLists.txt \ - smsd/CMakeLists.txt gammu/CMakeLists.txt +%patch0 -p1 -b .udev %build mkdir build @@ -96,8 +95,13 @@ pushd build -DINSTALL_BASH_COMPLETION=ON \ -DINSTALL_DOC=ON \ -DINSTALL_LOC=ON \ + -DBUILD_SHARED_LIBS=ON \ + -DINSTALL_UDEV_RULES=ON \ + -DSYSTEMD_FOUND=ON \ + -DWITH_SYSTEMD=ON \ + -DSYSTEMD_SERVICES_INSTALL_DIR=%{_unitdir} \ ../ -make +make %{?_smp_mflags} popd ##fix lines ending @@ -107,21 +111,22 @@ popd # docs/user/*.* ; do # sed -e 's/\r//' -i $docs #done -%check -pushd build -ctest -V -popd - %install make -C build install DESTDIR=%{buildroot} # Install config file +install -d %{buildroot}%{_sysconfdir} install -pm 0644 docs/config/smsdrc %{buildroot}%{_sysconfdir}/gammu-smsdrc %find_lang %{name} %find_lang lib%{name} +%check +pushd build +ctest -V %{?_smp_mflags} +popd + %post if [ $1 -eq 1 ] ; then # Initial installation @@ -137,8 +142,12 @@ fi %files -f %{name}.lang -%doc %{_docdir}/%{name} -%config %{_sysconfdir}/gammu-smsdrc +%docdir %{_docdir}/%{name} +%{_docdir}/%{name}/README.rst +%{_docdir}/%{name}/ChangeLog +%{_docdir}/%{name}/examples +%license %{_docdir}/%{name}/COPYING +%config(noreplace) %{_sysconfdir}/gammu-smsdrc %{_bindir}/%{name}* %{_bindir}/jadmaker %{_mandir}/man1/*.gz @@ -150,8 +159,8 @@ fi %{_datadir}/bash-completion/ %{_unitdir}/gammu-smsd.service %{_datadir}/%{name} -%{_sysconfdir}/udev/rules.d/69-gammu-acl.rules - +%{_udevrulesdir}/69-gammu-acl.rules +%{_udevrulesdir}/45-nokiadku2.rules %files libs -f lib%{name}.lang %{_libdir}/*.so.* @@ -164,6 +173,9 @@ fi %changelog +* Sun May 29 2016 Sérgio Basto - 1.37.3-2 +- A little package review with help of fedora-review + * Sun May 29 2016 Sérgio Basto - 1.37.3-1 - Update gammu to 1.37.3