Name: gpsd-devices Version: 0.0.7 Release: 0%{?dist} Summary: GPS Devices for navigation Group: System Environment/Daemons License: GPLv2+ URL: http://none/ Source0: gps-devices-information.fdi Source1: gpsd-devices-policy.fdi Source11: gps-device.fc Source12: gps-device.if Source13: gps-device.te.in Source21: gpsd-devices.fc Source22: gpsd-devices.if Source23: gpsd-devices.te.in Source30: README BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildArch: noarch BuildRequires: selinux-policy Requires: hal Requires: gpsd >= 2.39-3.0.1 Requires(pre): shadow-utils %description Automatic setup and use of GPS devices (Global Positioning System) for navigational purposes. Set up gpsd such that it is run as a system service. USB devices will be added to and removed from gpsd automatically. %prep %setup -c -T cp %{SOURCE11} %{SOURCE12} . sed 's|[@]VERSION@|%{version}|' %{SOURCE13} > gps-device.te cp %{SOURCE21} %{SOURCE22} . sed 's|[@]VERSION@|%{version}|' %{SOURCE23} > gpsd-devices.te cp %{SOURCE30} . %build make -f /usr/share/selinux/devel/Makefile %install rm -rf "%{buildroot}" install -d "%{buildroot}/usr/share/hal/fdi/information" install %{SOURCE0} "%{buildroot}/usr/share/hal/fdi/information/" install -d "%{buildroot}/usr/share/hal/fdi/policy" install %{SOURCE1} "%{buildroot}/usr/share/hal/fdi/policy/" # FIXME: HACK! install -d "%{buildroot}/usr/share/selinux/targeted" install gps-device.pp gpsd-devices.pp "%{buildroot}/usr/share/selinux/targeted/" install -d "%{buildroot}%{_datadir}/gpsd" mkfifo "%{buildroot}%{_datadir}/gpsd/dummy-device" %pre getent group gps >/dev/null || groupadd -r gps exit 0 %post semodule -i gps-device.pp gpsd-devices.pp || semodule -u gps-device.pp gpsd-devices.pp exit 0 %preun semodule -r gpsd-devices.pp gps-device.pp exit 0 %clean rm -rf "%{buildroot}" %files %defattr(-,root,root,-) %doc README %{_datadir}/hal/fdi/information/gps-devices-information.fdi %{_datadir}/hal/fdi/policy/gpsd-devices-policy.fdi %{_datadir}/selinux/targeted/gps-device.pp %{_datadir}/selinux/targeted/gpsd-devices.pp %attr(0644,root,gps) %{_datadir}/gpsd/dummy-device %changelog