dante-vl.spec 8.6 KB

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