dante-vl.spec 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. %define _localstatedir /var
  2. Summary: A free Socks v4/v5 client implementation
  3. Summary(ja): Socks v4/v5 クライアントのフリーな実装
  4. Name: dante
  5. Version: 1.3.2
  6. # define for pre-releases, undefine for normal releases.
  7. %undefine pre
  8. Release: 1%{?_dist_release}
  9. License: BSD-type
  10. Group: Applications/Internet
  11. URL: http://www.inet.no/dante/
  12. %define distname %{name}-%{version}%{?pre:-%{pre}}
  13. Source: ftp://ftp.inet.no/pub/socks/%{distname}.tar.gz
  14. Source1: sockd.conf
  15. Source2: sockd.init
  16. Vendor: Project Vine
  17. Distribution: Vine Linux
  18. Buildroot: %{_tmppath}/%{name}-%{version}-root
  19. BuildRequires: pam-devel tcp_wrappers
  20. Requires: pam
  21. %description
  22. Dante is a free implementation of the proxy protocols socks version 4,
  23. socks version 5 (rfc1928) and msproxy. It can be used as a firewall
  24. between networks. It is being developed by Inferno Nettverk A/S, a
  25. Norwegian consulting company. Commercial support is available.
  26. This package contains the dynamic libraries required to "socksify"
  27. existing applications to become socks clients.
  28. %description -l ja
  29. dante は proxy プロトコルである socks バージョン4,socks バージョン5
  30. (rfc1928), mxproxy のフリー実装です.ネットワーク間のファイアーウォールと
  31. して使うことが出来ます.開発はノルウェーのコンサルタント会社である
  32. Inferno Netverk A/S で行われています.コマーシャルサポートもあります.
  33. このパッケージには,既存のアプリケーションを socks クライアントに
  34. するのに必要なダイナミックライブラリが収められています.
  35. %package server
  36. Summary: A free Socks v4/v5 server implementation
  37. Summary(ja): Socks v4/v5 サーバのフリーな実装
  38. Group: System Environment/Daemons
  39. Requires: dante = %{version}
  40. Requires(pre): /sbin/chkconfig
  41. %description server
  42. This package contains the socks proxy daemon and its documentation.
  43. The sockd is the server part of the Dante socks proxy package and
  44. allows socks clients to connect through it to the network.
  45. %description server -l ja
  46. このパッケージには socks プロキシデーモンとそのドキュメントが
  47. 収められています.sockd は Dante socks プロキシパッケージの
  48. サーバ部分で,socks クライアントは sockd サーバを介することにより
  49. ネットワークに接続出来ます.
  50. %package devel
  51. Summary: development libraries for socks
  52. Summary(ja): socks 用開発ライブラリ
  53. Group: Development/Libraries
  54. Requires: dante = %{version}
  55. %description devel
  56. Additional libraries required to compile programs that use socks.
  57. %description devel -l ja
  58. socks を使うプログラムをコンパイルするのに必要な追加ライブラリです.
  59. %prep
  60. %setup -q -n %{distname}
  61. # no need to preload libdl.so explicitly.
  62. %{__sed} -e 's/@SOCKSIFY_PRELOAD_LIBS@//' bin/socksify.in >bin/socksify.in.new
  63. %{__mv} bin/socksify.in.new bin/socksify.in
  64. # This file is embedded here instead of being another source in order
  65. # to the prefix directory
  66. cat >sockd.init <<EOF
  67. #!/bin/sh
  68. #
  69. # sockd This shell script takes care of starting and stopping
  70. # the Dante server.
  71. #
  72. # chkconfig: 2345 65 35
  73. # description: sockd implements a socks v4/v5 proxy server
  74. # Source function library.
  75. . /etc/rc.d/init.d/functions
  76. # Source networking configuration.
  77. . /etc/sysconfig/network
  78. # Check that networking is up.
  79. [ \${NETWORKING} = "no" ] && exit 0
  80. [ -f %{_sbindir}/sockd ] || exit 0
  81. [ -f %{_sysconfdir}/sockd.conf ] || exit 0
  82. # See how we were called.
  83. case "\$1" in
  84. start)
  85. # Start daemons.
  86. echo -n "Starting sockd: "
  87. daemon %{_sbindir}/sockd -D
  88. echo
  89. touch %{_var}/lock/subsys/sockd
  90. ;;
  91. stop)
  92. # Stop daemons.
  93. echo -n "Shutting down sockd: "
  94. killproc sockd
  95. echo
  96. rm -f %{_var}/lock/subsys/sockd
  97. ;;
  98. restart)
  99. \$0 stop
  100. \$0 start
  101. ;;
  102. status)
  103. status sockd
  104. ;;
  105. *)
  106. echo "Usage: sockd {start|stop|restart|status}"
  107. exit 1
  108. esac
  109. exit 0
  110. EOF
  111. %build
  112. %configure \
  113. %if %{?_dist_release} != "vl7"
  114. --without-glibc-secure
  115. %endif
  116. %{__make}
  117. %install
  118. %{__rm} -rf %{buildroot}
  119. %{makeinstall}
  120. #set library as executable - prevent ldd from complaining
  121. %{__chmod} +x %{buildroot}%{_libdir}/*.so.*.*
  122. %{__install} -d %{buildroot}%{_sysconfdir}/rc.d/init.d %{buildroot}%{_bindir}
  123. %{__install} -m 644 example/socks-simple.conf %{buildroot}%{_sysconfdir}/socks.conf
  124. %{__install} -m 644 %{_sourcedir}/sockd.conf %{buildroot}%{_sysconfdir}
  125. %{__install} -m 755 %{SOURCE2} %{buildroot}%{_sysconfdir}/rc.d/init.d/sockd
  126. ## remove unuse files
  127. rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la
  128. %clean
  129. %{__rm} -rf %{buildroot}
  130. %post -p /sbin/ldconfig
  131. %postun -p /sbin/ldconfig
  132. %post server
  133. /sbin/chkconfig --add sockd
  134. %preun server
  135. if [ "$1" = 0 ]; then
  136. service sockd stop >/dev/null 2>&1
  137. /sbin/chkconfig --del sockd
  138. fi
  139. %postun server
  140. if [ "$1" -ge "1" ]; then
  141. service sockd condrestart > /dev/null 2>&1
  142. fi
  143. %files
  144. %defattr(-,root,root)
  145. %doc BUGS CREDITS INSTALL LICENSE NEWS README README.ldap SUPPORT UPGRADE VERSION
  146. %doc doc/README* doc/rfc* doc/SOCKS4*protocol
  147. %doc example/sock*
  148. %{_libdir}/libsocks.so.*
  149. %{_libdir}/libdsocks.so*
  150. %{_bindir}/socksify
  151. %{_mandir}/man5/socks.conf.5*
  152. %{_mandir}/man1/socksify.1*
  153. %config(noreplace) %{_sysconfdir}/socks.conf
  154. %files server
  155. %defattr(-,root,root)
  156. %{_mandir}/man8/sockd.8*
  157. %{_sbindir}/sockd
  158. %{_mandir}/man5/sockd.conf.5*
  159. %config(noreplace) %{_sysconfdir}/sockd.conf
  160. %config %{_sysconfdir}/rc.d/init.d/sockd
  161. %files devel
  162. %defattr(-,root,root)
  163. %{_libdir}/libsocks.so
  164. %{_libdir}/libsocks.a
  165. %{_includedir}/socks.h
  166. %changelog
  167. * Tue May 01 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.2-1
  168. - new upstream release.
  169. * Sat Sep 20 2008 Shu KONNO <owa@bg.wakwak.com> 1.1.14-1vl5
  170. - applied new versioning policy, spec in utf-8
  171. - removed *.la
  172. * Mon May 10 2004 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  173. - 1.1.14-0vl1: built for VineSeed
  174. - use/change macros for dirs (/etc, /var)
  175. - re-enable chkconfig and add stop/restart on uninstall/upgrade
  176. - include our sockd.conf (Source1) based on example/sockd-basic.conf
  177. * Mon Nov 24 2003 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  178. - 1.1.14-0vl0.26.0: new upstream release
  179. - remove preloading libdl.so (in glibc-devel) from socksify
  180. * Mon Dec 02 2002 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  181. - 1.1.13-0vl0.26.0: built for Vine Linux 2.5/2.6
  182. * Mon Dec 02 2002 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  183. - 1.1.13-0vl0.21.0: built for Vine Linux 2.1.x
  184. - new upstream release:
  185. dante-config_parse.patch and dante-recvmsg.patch are incorporated.
  186. - set noreplace flag to sock{s,d}.conf
  187. - remove BuildPreReq: flex
  188. * Mon May 13 2002 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  189. - 1.1.12-0vl7: built for Vine Linux 2.5
  190. * Mon May 13 2002 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  191. - 1.1.12-0vl6: built for Vine Linux 2.1.x
  192. - change dante-recvmsg.patch to fix core dump with libdsocks
  193. * Wed Apr 24 2002 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  194. - 1.1.12-0vl5: built for Vine Linux 2.5
  195. * Sat Apr 20 2002 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  196. - 1.1.12-0vl4: built for Vine Linux 2.1.x
  197. - replaced source with full-release of 1.1.12.
  198. - replaced dante-recvmsg.patch with one from original author
  199. - added dependencies (pam, tcp_wrappers)
  200. * Sun Mar 31 2002 Jun Nishii <jun@vinelinux.org>
  201. - 1.1.12-0vl3: rebuild for Vine Linux 2.5
  202. * Mon Mar 18 2002 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  203. - 1.1.12-0vl2: patch to include/{common,sockd}.h
  204. * Thu Feb 14 2002 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  205. - 1.1.12-0vl1: updated to 1.1.12-pre1 and modified spec for pre-releases
  206. * Mon Feb 11 2002 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  207. - 1.1.11-0vl2: patch to lib/config_parse.y
  208. * Fri Dec 14 2001 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  209. - 1.1.11-0vl1
  210. * Sat Nov 10 2001 akira yamada <akira@vinelinux.org> 1.1.10-0vl2
  211. - moved libsocs.so to dante-devel from dante.
  212. - added defattr for dante-devel.
  213. - added BuildPreReq: flex
  214. * Thu Sep 06 2001 Toru Sagami <sagami@vinelinux.org>
  215. - 1.1.10-0vl1: updated to 1.1.10 with a bit better macros and minor spec fixes
  216. - fixed Group
  217. * Fri May 18 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@vinelinux.org>
  218. - 1.1.9-1vl1
  219. - based on 1.1.9-1 generated from original tarball (by rpm -ts)
  220. - rebuilt for Vine Linux
  221. - modified spec file
  222. * Thu Oct 12 2000 Karl-Andre' Skevik <karls@inet.no>
  223. -use of macros for directory locations/paths
  224. -explicitly name documentation files
  225. -run chkconfig --del before files are deleted on uninstall
  226. * Wed Mar 10 1999 Karl-Andre' Skevik <karls@inet.no>
  227. - Integrated into CVS
  228. - socksify patch no longer needed
  229. * Thu Mar 04 1999 Oren Tirosh <oren@hishome.net>
  230. - configurable %{prefix}, fixed daemon init script
  231. - added /lib/libdl.so to socksify
  232. * Wed Mar 03 1999 Oren Tirosh <oren@hishome.net>
  233. - First spec file for Dante