scponly-vl.spec 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. Summary: Limited shell for secure file transfers
  2. Name: scponly
  3. Version: 4.8
  4. Release: 1%{_dist_release}
  5. License: GPL
  6. Group: System Environment/Shells
  7. URL: http://sublimation.org/scponly/wiki/
  8. Patch1: scponly-4.8-chown.patch
  9. Patch2: scponly-4.8-docs.patch
  10. Source: http://sublimation.org/scponly/scponly-%{version}.tgz
  11. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  12. Requires: openssh-server
  13. Requires: rsync
  14. Requires: subversion
  15. BuildRequires: openssh-server
  16. BuildRequires: rsync
  17. BuildRequires: subversion
  18. %description
  19. scponly is an alternative 'shell' for system administrators
  20. who would like to provide access to remote users to both
  21. read and write local files without providing any remote
  22. execution priviledges. Functionally, it is best described
  23. as a wrapper to the "tried and true" ssh suite of applications.
  24. %prep
  25. %setup
  26. %patch1 -p1 -b .chown
  27. %patch2 -p1 -b .docs
  28. %build
  29. mkdir build-scp build-rsync build-scp-rsync build-svn build-scp-svn \
  30. build-rsync-svn build-scp-rsync-svn build-svnserve build-scp-svnserve \
  31. build-rsync-svnserve build-scp-rsync-svnserve build-svn-svnserve \
  32. build-scp-svn-svnserve build-rsync-svn-svnserve \
  33. build-scp-rsync-svn-svnserve
  34. build() {
  35. ln -sf ../configure
  36. ln -sf ../Makefile.in
  37. ln -sf ../setup_chroot.sh.in
  38. ln -sf ../config.h.in
  39. ln -sf ../groups.c
  40. ln -sf ../helper.c
  41. ln -sf ../scponly.c
  42. ln -sf ../scponly.h
  43. ln -sf ../scponly.8
  44. ln -sf ../debuglevel
  45. %configure \
  46. --cache-file=../config.cache \
  47. --enable-chrooted-binary \
  48. $*
  49. %{__make} %{?_smp_mflags} OPTS="%{optflags}"
  50. }
  51. pushd build-scp
  52. build --enable-scp-compat \
  53. --enable-winscp-compat
  54. popd
  55. pushd build-rsync
  56. build --enable-rsync-compat \
  57. --disable-scp-compat \
  58. --without-sftp-server
  59. popd
  60. pushd build-scp-rsync
  61. build --enable-scp-compat \
  62. --enable-winscp-compat \
  63. --enable-rsync-compat
  64. popd
  65. pushd build-svn
  66. build --enable-svn-compat \
  67. --disable-scp-compat \
  68. --without-sftp-server
  69. popd
  70. pushd build-scp-svn
  71. build --enable-scp-compat \
  72. --enable-winscp-compat \
  73. --enable-svn-compat
  74. popd
  75. pushd build-rsync-svn
  76. build --enable-rsync-compat \
  77. --enable-svn-compat \
  78. --disable-scp-compat \
  79. --without-sftp-server
  80. popd
  81. pushd build-scp-rsync-svn
  82. build --enable-scp-compat \
  83. --enable-winscp-compat \
  84. --enable-rsync-compat \
  85. --enable-svn-compat
  86. popd
  87. pushd build-svnserve
  88. build --enable-svnserv-compat \
  89. --disable-scp-compat \
  90. --without-sftp-server
  91. popd
  92. pushd build-scp-svnserve
  93. build --enable-scp-compat \
  94. --enable-winscp-compat \
  95. --enable-svnserv-compat
  96. popd
  97. pushd build-rsync-svnserve
  98. build --enable-rsync-compat \
  99. --enable-svnserv-compat \
  100. --disable-scp-compat \
  101. --without-sftp-server
  102. popd
  103. pushd build-scp-rsync-svnserve
  104. build --enable-scp-compat \
  105. --enable-winscp-compat \
  106. --enable-rsync-compat \
  107. --enable-svnserv-compat
  108. popd
  109. pushd build-svn-svnserve
  110. build --enable-svn-compat \
  111. --enable-svnserv-compat \
  112. --disable-scp-compat \
  113. --without-sftp-server
  114. popd
  115. pushd build-scp-svn-svnserve
  116. build --enable-scp-compat \
  117. --enable-winscp-compat \
  118. --enable-svn-compat \
  119. --enable-svnserv-compat
  120. popd
  121. pushd build-rsync-svn-svnserve
  122. build --enable-rsync-compat \
  123. --enable-svn-compat \
  124. --enable-svnserv-compat \
  125. --disable-scp-compat \
  126. --without-sftp-server
  127. popd
  128. pushd build-scp-rsync-svn-svnserve
  129. build --enable-scp-compat \
  130. --enable-winscp-compat \
  131. --enable-rsync-compat \
  132. --enable-svn-compat \
  133. --enable-svnserv-compat
  134. popd
  135. %install
  136. %{__rm} -rf %{buildroot}
  137. for d in scp rsync scp-rsync svn scp-svn rsync-svn scp-rsync-svn svnserve \
  138. scp-svnserve rsync-svnserve scp-rsync-svnserve svn-svnserve \
  139. scp-svn-svnserve rsync-svn-svnserve scp-rsync-svn-svnserve; do
  140. pushd build-$d
  141. cp setup_chroot.sh ../
  142. %{__make} install DESTDIR="%{buildroot}"
  143. mv %{buildroot}%{_bindir}/scponly %{buildroot}%{_bindir}/scponly.$d
  144. mv %{buildroot}%{_sbindir}/scponlyc %{buildroot}%{_sbindir}/scponlyc.$d
  145. popd
  146. done
  147. %clean
  148. %{__rm} -rf %{buildroot}
  149. %post
  150. update-alternatives \
  151. --install /usr/bin/scponly scponly /usr/bin/scponly.scp 100 \
  152. --slave /usr/sbin/scponlyc scponlyc /usr/sbin/scponlyc.scp
  153. for d in scp rsync scp-rsync svn scp-svn rsync-svn scp-rsync-svn svnserve \
  154. scp-svnserve rsync-svnserve scp-rsync-svnserve svn-svnserve \
  155. scp-svn-svnserve rsync-svn-svnserve scp-rsync-svn-svnserve; do
  156. update-alternatives \
  157. --install /usr/bin/scponly scponly /usr/bin/scponly.$d 10 \
  158. --slave /usr/sbin/scponlyc scponlyc /usr/sbin/scponlyc.$d
  159. done
  160. %postun
  161. update-alternatives --remove-all scponly
  162. %files
  163. %defattr(-, root, root, 0755)
  164. %doc AUTHOR BUILDING-JAILS.TXT CHANGELOG CONTRIB COPYING INSTALL README TODO
  165. %doc setup_chroot.sh build_extras/setup_chroot.sh*
  166. %doc %{_mandir}/man8/scponly.8*
  167. %{_bindir}/scponly.*
  168. %{_sbindir}/scponlyc.*
  169. %dir %{_sysconfdir}/scponly/
  170. %config(noreplace) %{_sysconfdir}/scponly/*
  171. %changelog
  172. * Sun Mar 22 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.8-1
  173. - initial build for Vine Linux.