From 54e7d8476ca3b41cbb38226e58241e1920ad357a Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 16 Jul 2017 17:24:34 +0200 Subject: rename to volumefs/userfs and add systemd unit files --- packaging/volumefs.spec | 45 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) (limited to 'packaging/volumefs.spec') diff --git a/packaging/volumefs.spec b/packaging/volumefs.spec index 49e8ec6..d5445df 100644 --- a/packaging/volumefs.spec +++ b/packaging/volumefs.spec @@ -8,16 +8,23 @@ URL: https://git.javispedro.com/cgit/volumefs.git/ Source0: %{name}-%{version}.tar.gz BuildRequires: pkgconfig(fuse) BuildRequires: pkgconfig(udisks2) +%if 0%{?suse_version} >= 1210 +BuildRequires: systemd-rpm-macros +%endif %description volumefs is a FUSE filesystem that will be automatically populated with symlinks to all currently mounted external filesystems, as detected by UDisks2. -%package -n usersfs -Summary: FUSE filesystem for showing ahome dirs of all users +%package -n userfs +Summary: FUSE filesystem for showing home dirs of all users Group: System Environment/Base +%description -n userfs +userfs is a FUSE filesystem that will be automatically populated with +symlinks to all the home directories of users defined in the current system. + %prep %autosetup @@ -27,14 +34,46 @@ Group: System Environment/Base %install %make_install +install -D -m 644 scripts/volumefs.service %{buildroot}%{_unitdir}/volumefs.service +install -D -m 644 scripts/userfs.service %{buildroot}%{_unitdir}/userfs.service %clean rm -rf %{buildroot} %files %defattr(-,root,root) +%{_sbindir}/volumefs +%{_unitdir}/volumefs.service + +%pre +%service_add_pre volumefs.service + +%post +%service_add_post volumefs.service + +%preun +%service_del_preun volumefs.service + +%postun +%service_del_postun volumefs.service + +%files -n userfs +%defattr(-,root,root) +%{_sbindir}/userfs +%{_unitdir}/userfs.service + +%pre -n userfs +%service_add_pre userfs.service + +%post -n userfs +%service_add_post userfs.service + +%preun -n userfs +%service_del_preun userfs.service + +%postun -n userfs +%service_del_postun userfs.service -%files -n usersfs %changelog -- cgit v1.2.3