Skip to content

Commit

Permalink
[packaging] Add mount script for ffs, re-enable msyncd plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernd Wachter committed Aug 27, 2013
1 parent 56bfa87 commit 5ef9d91
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 5 deletions.
10 changes: 10 additions & 0 deletions init/systemd/dev-mtp.mount
@@ -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
5 changes: 4 additions & 1 deletion init/systemd/systemd.pro
Expand Up @@ -3,7 +3,10 @@ TEMPLATE = subdirs
service.files = *.service service.files = *.service
service.path = /usr/lib/systemd/user/ service.path = /usr/lib/systemd/user/


mount.files = *.mount
mount.path = /lib/systemd/system/

init.files = buteo-mtp init.files = buteo-mtp
init.path = /usr/bin/ init.path = /usr/bin/


INSTALLS += service init INSTALLS += service init mount
6 changes: 3 additions & 3 deletions mtpserver/mtpserver.pro
Expand Up @@ -20,10 +20,10 @@ HEADERS += mtpserver.h
SOURCES += mtpserver.cpp SOURCES += mtpserver.cpp


#clean #clean
QMAKE_CLEAN += $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) QMAKE_CLEAN += $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)


#install #install
target.path = /usr/lib target.path = /usr/lib/buteo-plugins-qt5
server.path = /etc/buteo/profiles/server server.path = /etc/buteo/profiles/server
server.files = mtp.xml server.files = mtp.xml


Expand Down
18 changes: 17 additions & 1 deletion rpm/buteo-mtp-qt5.spec
Expand Up @@ -20,15 +20,21 @@ Requires: mtp-vendor-configuration
# thumbnails on request; at least Windows 8 requires thumbnails to be # thumbnails on request; at least Windows 8 requires thumbnails to be
# generated on the device. # generated on the device.
Requires: tumbler Requires: tumbler
Requires(pre): shadow-utils
Requires(pre): /usr/bin/groupadd-user
Provides: buteo-mtp = %{version} Provides: buteo-mtp = %{version}
Obsoletes: buteo-mtp < %{version} Obsoletes: buteo-mtp < %{version}


%description %description
%{summary}. %{summary}.


# TODO: once proper activation as msyncd plugin works as expected,
# move user session startup into sub-package
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
/usr/lib/systemd/user/buteo-mtp.service /usr/lib/systemd/user/buteo-mtp.service
%{_unitdir}/*.mount
%{_unitdir}/local-fs.target.wants/*.mount
%{_bindir}/buteo-mtp %{_bindir}/buteo-mtp
%{_libdir}/*.so.* %{_libdir}/*.so.*
%{_libdir}/mtp/*.so %{_libdir}/mtp/*.so
Expand Down Expand Up @@ -77,7 +83,7 @@ Group: System/Libraries


%files sync-plugin %files sync-plugin
%defattr(-,root,root,-) %defattr(-,root,root,-)
#%{_libdir}/sync/*.so %{_libdir}/buteo-plugins-qt5/*.so
%config %{_sysconfdir}/buteo/profiles/server/*.xml %config %{_sysconfdir}/buteo/profiles/server/*.xml




Expand Down Expand Up @@ -108,6 +114,16 @@ make
%install %install
make INSTALL_ROOT=%{buildroot} install make INSTALL_ROOT=%{buildroot} install
chmod +x %{buildroot}/%{_bindir}/buteo-mtp 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 %post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig

0 comments on commit 5ef9d91

Please sign in to comment.