[libnfc] packaged example configuration file
Jaroslav Škarvada
jskarvad at fedoraproject.org
Tue Apr 30 16:40:18 UTC 2013
commit 11489530900582a5dfa5f73715118e9afa252176
Author: Jaroslav Škarvada <jskarvad at redhat.com>
Date: Tue Apr 30 18:40:13 2013 +0200
packaged example configuration file
- packaged udev rule
- removed some trailing spaces
libnfc.spec | 67 ++++++++++++++++++++++++++++++++++++++++++----------------
1 files changed, 48 insertions(+), 19 deletions(-)
---
diff --git a/libnfc.spec b/libnfc.spec
index 956136f..ae55e35 100644
--- a/libnfc.spec
+++ b/libnfc.spec
@@ -1,21 +1,24 @@
-Name: libnfc
-Version: 1.7.0
-Release: 0.3.rc7%{?dist}
-Summary: NFC SDK and Programmers API
-
-Group: System Environment/Libraries
-License: LGPLv3+
-URL: http://www.libnfc.org/
-Source0: http://libnfc.googlecode.com/files/%{name}-%{version}-rc7.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: pcsc-lite-devel
-BuildRequires: libusb-devel
-BuildRequires: doxygen
+Name: libnfc
+Version: 1.7.0
+Release: 0.4.rc7%{?dist}
+Summary: NFC SDK and Programmers API
+
+Group: System Environment/Libraries
+License: LGPLv3+
+URL: http://www.libnfc.org/
+Source0: http://libnfc.googlecode.com/files/%{name}-%{version}-rc7.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires: pcsc-lite-devel
+BuildRequires: libusb-devel
+BuildRequires: doxygen
+Requires: systemd
+Requires(post): systemd
+Requires(postun): systemd
%description
-libnfc is the first free NFC SDK and Programmers API released under the
-GNU Lesser General Public License. It provides complete transparency and
+libnfc is the first free NFC SDK and Programmers API released under the
+GNU Lesser General Public License. It provides complete transparency and
royalty-free use for everyone.
%package devel
@@ -25,7 +28,7 @@ Requires: %{name} = %{version}-%{release}
Requires: pkgconfig
%description devel
-The libnfc-devel package contains header files necessary for
+The libnfc-devel package contains header files necessary for
developing programs using libnfc.
%package examples
@@ -55,15 +58,36 @@ make install DESTDIR=$RPM_BUILD_ROOT
# remove *.la files
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
+# install udev rule
+mkdir -p %{buildroot}%{_sysconfdir}/udev/rules.d/
+install -p -m 0644 contrib/udev/42-pn53x.rules %{buildroot}%{_sysconfdir}/udev/rules.d/
+
+# fix typo in sample config file (reported upstream - issue 247)
+sed -i 's/allow_intrusive_autoscan/allow_intrusive_scan/g' libnfc.conf.sample
+
+# install sample config file
+mkdir -p %{buildroot}%{_sysconfdir}/nfc/devices.d
+install -p -m 0644 libnfc.conf.sample %{buildroot}%{_sysconfdir}/nfc/libnfc.conf
+
%clean
rm -rf $RPM_BUILD_ROOT
-%post -p /sbin/ldconfig
+%post
+/sbin/ldconfig
+[ "$1" = 1 ] && udevadm control --reload
+exit 0
-%postun -p /sbin/ldconfig
+%postun
+/sbin/ldconfig
+[ "$1" = 0 ] && udevadm control --reload
+exit 0
%files
%defattr(-,root,root,-)
+%dir %{_sysconfdir}/nfc
+%dir %{_sysconfdir}/nfc/devices.d
+%config(noreplace) %{_sysconfdir}/udev/rules.d/42-pn53x.rules
+%config(noreplace) %{_sysconfdir}/nfc/libnfc.conf
%{_libdir}/*.so.*
%doc COPYING README AUTHORS ChangeLog
@@ -80,6 +104,11 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/*
%changelog
+* Tue Apr 30 2013 Jaroslav Škarvada <jskarvad at redhat.com> - 1.7.0-0.4.rc7
+- packaged example configuration file
+- packaged udev rule
+- removed some trailing spaces
+
* Mon Apr 08 2013 F. Kooman <fkooman at tuxed.net> - 1.7.0-0.3.rc7
- update source to rc7 as well
More information about the scm-commits
mailing list