summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2017-07-16 17:24:34 +0200
committerJavier <dev.git@javispedro.com>2017-07-16 17:24:34 +0200
commit54e7d8476ca3b41cbb38226e58241e1920ad357a (patch)
tree0cb38942404ac0d8b3529f7c93958065edc1a4f8 /packaging
parent48cf22d3af28386ad853c30d3e389570e3cdca6e (diff)
downloadvolumefs-54e7d8476ca3b41cbb38226e58241e1920ad357a.tar.gz
volumefs-54e7d8476ca3b41cbb38226e58241e1920ad357a.zip
rename to volumefs/userfs and add systemd unit files
Diffstat (limited to 'packaging')
-rw-r--r--packaging/volumefs.spec45
1 files changed, 42 insertions, 3 deletions
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