Permalink
Browse files

[packaging] Add mount script for ffs, re-enable msyncd plugin

  • Loading branch information...
bwachter committed Aug 27, 2013
1 parent 56bfa87 commit 5ef9d91a621e3a01cfd16311cde897bddf47df47
Showing with 34 additions and 5 deletions.
  1. +10 −0 init/systemd/dev-mtp.mount
  2. +4 −1 init/systemd/systemd.pro
  3. +3 −3 mtpserver/mtpserver.pro
  4. +17 −1 rpm/buteo-mtp-qt5.spec
View
@@ -0,0 +1,10 @@
+[Unit]
+Description=FFS mount
+Documentation=man:hier(7)
+Before=local-fs.target
+
+[Mount]
+What=mtp
+Where=/dev/mtp
+Type=functionfs
+Options=mode=0770,gid=1024
View
@@ -3,7 +3,10 @@ TEMPLATE = subdirs
service.files = *.service
service.path = /usr/lib/systemd/user/
+mount.files = *.mount
+mount.path = /lib/systemd/system/
+
init.files = buteo-mtp
init.path = /usr/bin/
-INSTALLS += service init
+INSTALLS += service init mount
View
@@ -20,10 +20,10 @@ HEADERS += mtpserver.h
SOURCES += mtpserver.cpp
#clean
-QMAKE_CLEAN += $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)
+QMAKE_CLEAN += $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)
-#install
-target.path = /usr/lib
+#install
+target.path = /usr/lib/buteo-plugins-qt5
server.path = /etc/buteo/profiles/server
server.files = mtp.xml
View
@@ -20,15 +20,21 @@ Requires: mtp-vendor-configuration
# thumbnails on request; at least Windows 8 requires thumbnails to be
# generated on the device.
Requires: tumbler
+Requires(pre): shadow-utils
+Requires(pre): /usr/bin/groupadd-user
Provides: buteo-mtp = %{version}
Obsoletes: buteo-mtp < %{version}
%description
%{summary}.
+# TODO: once proper activation as msyncd plugin works as expected,
+# move user session startup into sub-package
%files
%defattr(-,root,root,-)
/usr/lib/systemd/user/buteo-mtp.service
+%{_unitdir}/*.mount
+%{_unitdir}/local-fs.target.wants/*.mount
%{_bindir}/buteo-mtp
%{_libdir}/*.so.*
%{_libdir}/mtp/*.so
@@ -77,7 +83,7 @@ Group: System/Libraries
%files sync-plugin
%defattr(-,root,root,-)
-#%{_libdir}/sync/*.so
+%{_libdir}/buteo-plugins-qt5/*.so
%config %{_sysconfdir}/buteo/profiles/server/*.xml
@@ -108,6 +114,16 @@ make
%install
make INSTALL_ROOT=%{buildroot} install
chmod +x %{buildroot}/%{_bindir}/buteo-mtp
+mkdir -p %{buildroot}/%{_unitdir}/local-fs.target.wants
+ln -s ../dev-mtp.mount %{buildroot}/%{_unitdir}/local-fs.target.wants/
+
+
+# create group if it does not exist yet, though don't remove it
+# as it should come from other packages
+%pre
+groupadd -f -g 1024 mtp
+groupadd-user mtp
+
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

0 comments on commit 5ef9d91

Please sign in to comment.