forked from pool/neard
Accepting request 213941 from home:acho-novell:branches:hardware
- use --prefix=%_prefix, kill the %clean section. kill has_systemd.(bnc#837978) - add udev rules to enable this service by systemd. - remove systemctl from %post. OBS-URL: https://build.opensuse.org/request/show/213941 OBS-URL: https://build.opensuse.org/package/show/hardware/neard?expand=0&rev=5
This commit is contained in:
parent
5df9a99482
commit
ffa4c1d5e9
5
99-neard.rules
Normal file
5
99-neard.rules
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# This file is part of neard
|
||||||
|
|
||||||
|
# run a command on remove events
|
||||||
|
SUBSYSTEM=="nfc", TAG+="systemd", ENV{SYSTEMD_WANTS}+="neard.service"
|
||||||
|
|
@ -1,4 +1,13 @@
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
|
Wed Jan 15 06:43:49 UTC 2014 - acho@suse.com
|
||||||
|
|
||||||
|
- use --prefix=%_prefix, kill the %clean section. kill has_systemd.
|
||||||
|
(bnc#837978)
|
||||||
|
|
||||||
|
- add udev rules to enable this service by systemd.
|
||||||
|
|
||||||
|
- remove systemctl from %post.
|
||||||
|
-------------------------------------------------------------------
|
||||||
Wed Dec 18 12:36:37 UTC 2013 - cfarrell@suse.com
|
Wed Dec 18 12:36:37 UTC 2013 - cfarrell@suse.com
|
||||||
|
|
||||||
- license update: GPL-2.0
|
- license update: GPL-2.0
|
||||||
|
22
neard.spec
22
neard.spec
@ -21,8 +21,6 @@ Name: neard
|
|||||||
BuildRequires: pkgconfig(dbus-1) >= 1.4
|
BuildRequires: pkgconfig(dbus-1) >= 1.4
|
||||||
%if 0%{?suse_version} >= 1210
|
%if 0%{?suse_version} >= 1210
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
%{?systemd_requires}
|
|
||||||
%define has_systemd 1
|
|
||||||
%endif
|
%endif
|
||||||
Version: 0.13
|
Version: 0.13
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -32,9 +30,11 @@ Group: Hardware/Mobile
|
|||||||
Url: http://01.org/linux-nfc/
|
Url: http://01.org/linux-nfc/
|
||||||
Source: https://www.kernel.org/pub/linux/network/nfc/neard-%{version}.tar.bz2
|
Source: https://www.kernel.org/pub/linux/network/nfc/neard-%{version}.tar.bz2
|
||||||
Source1: neard.service
|
Source1: neard.service
|
||||||
|
Source2: 99-neard.rules
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: check-devel
|
BuildRequires: check-devel
|
||||||
|
BuildRequires: libudev-devel
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
BuildRequires: pkg-config
|
BuildRequires: pkg-config
|
||||||
BuildRequires: systemd-devel
|
BuildRequires: systemd-devel
|
||||||
@ -65,7 +65,7 @@ Files needed to test applications for the NFC stack.
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -fiv
|
autoreconf -fiv
|
||||||
%configure --prefix=/usr \
|
%configure --prefix=%_prefix \
|
||||||
--enable-tools \
|
--enable-tools \
|
||||||
--enable-test
|
--enable-test
|
||||||
|
|
||||||
@ -74,37 +74,25 @@ make %{?_smp_mflags} all V=1
|
|||||||
%install
|
%install
|
||||||
%make_install
|
%make_install
|
||||||
install --mode=0644 -D %{SOURCE1} %{buildroot}%{_unitdir}/neard.service
|
install --mode=0644 -D %{SOURCE1} %{buildroot}%{_unitdir}/neard.service
|
||||||
|
install --mode=0644 -D %{SOURCE2} %{buildroot}%{_prefix}/lib/udev/rules.d/99-neard.rules
|
||||||
%clean
|
|
||||||
rm -rf %{buildroot}
|
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
%if 0%{?has_systemd}
|
|
||||||
%service_add_pre neard.service
|
%service_add_pre neard.service
|
||||||
%endif
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
# todo: check if this is still obeyed / needed with systemd
|
|
||||||
%{fillup_only -n neard}
|
|
||||||
/bin/systemctl enable neard.service 2>&1 || :
|
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%service_del_preun neard.service
|
%service_del_preun neard.service
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%{insserv_cleanup}
|
|
||||||
%if 0%{?has_systemd}
|
|
||||||
%service_del_postun neard.service
|
%service_del_postun neard.service
|
||||||
%else
|
|
||||||
%{insserv_cleanup}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%config %{_sysconfdir}/dbus-1/system.d/org.neard.conf
|
%config %{_sysconfdir}/dbus-1/system.d/org.neard.conf
|
||||||
%dir %{_prefix}/lib/nfc
|
%dir %{_prefix}/lib/nfc
|
||||||
%{_prefix}/lib/nfc/neard
|
%{_prefix}/lib/nfc/neard
|
||||||
|
%{_prefix}/lib/udev/rules.d/99-neard.rules
|
||||||
%{_unitdir}/neard.service
|
%{_unitdir}/neard.service
|
||||||
%doc %{_mandir}/man1/nfctool.1.gz
|
%doc %{_mandir}/man1/nfctool.1.gz
|
||||||
%doc %{_mandir}/man5/neard.conf.5.gz
|
%doc %{_mandir}/man5/neard.conf.5.gz
|
||||||
|
Loading…
Reference in New Issue
Block a user