dante-vl.spec 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  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.4.0
  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. * Sun Jan 12 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.0-1
  168. - new upstream release.
  169. * Tue May 01 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.2-1
  170. - new upstream release.
  171. * Sat Sep 20 2008 Shu KONNO <owa@bg.wakwak.com> 1.1.14-1vl5
  172. - applied new versioning policy, spec in utf-8
  173. - removed *.la
  174. * Mon May 10 2004 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  175. - 1.1.14-0vl1: built for VineSeed
  176. - use/change macros for dirs (/etc, /var)
  177. - re-enable chkconfig and add stop/restart on uninstall/upgrade
  178. - include our sockd.conf (Source1) based on example/sockd-basic.conf
  179. * Mon Nov 24 2003 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  180. - 1.1.14-0vl0.26.0: new upstream release
  181. - remove preloading libdl.so (in glibc-devel) from socksify
  182. * Mon Dec 02 2002 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  183. - 1.1.13-0vl0.26.0: built for Vine Linux 2.5/2.6
  184. * Mon Dec 02 2002 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  185. - 1.1.13-0vl0.21.0: built for Vine Linux 2.1.x
  186. - new upstream release:
  187. dante-config_parse.patch and dante-recvmsg.patch are incorporated.
  188. - set noreplace flag to sock{s,d}.conf
  189. - remove BuildPreReq: flex
  190. * Mon May 13 2002 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  191. - 1.1.12-0vl7: built for Vine Linux 2.5
  192. * Mon May 13 2002 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  193. - 1.1.12-0vl6: built for Vine Linux 2.1.x
  194. - change dante-recvmsg.patch to fix core dump with libdsocks
  195. * Wed Apr 24 2002 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  196. - 1.1.12-0vl5: built for Vine Linux 2.5
  197. * Sat Apr 20 2002 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  198. - 1.1.12-0vl4: built for Vine Linux 2.1.x
  199. - replaced source with full-release of 1.1.12.
  200. - replaced dante-recvmsg.patch with one from original author
  201. - added dependencies (pam, tcp_wrappers)
  202. * Sun Mar 31 2002 Jun Nishii <jun@vinelinux.org>
  203. - 1.1.12-0vl3: rebuild for Vine Linux 2.5
  204. * Mon Mar 18 2002 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  205. - 1.1.12-0vl2: patch to include/{common,sockd}.h
  206. * Thu Feb 14 2002 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  207. - 1.1.12-0vl1: updated to 1.1.12-pre1 and modified spec for pre-releases
  208. * Mon Feb 11 2002 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  209. - 1.1.11-0vl2: patch to lib/config_parse.y
  210. * Fri Dec 14 2001 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  211. - 1.1.11-0vl1
  212. * Sat Nov 10 2001 akira yamada <akira@vinelinux.org> 1.1.10-0vl2
  213. - moved libsocs.so to dante-devel from dante.
  214. - added defattr for dante-devel.
  215. - added BuildPreReq: flex
  216. * Thu Sep 06 2001 Toru Sagami <sagami@vinelinux.org>
  217. - 1.1.10-0vl1: updated to 1.1.10 with a bit better macros and minor spec fixes
  218. - fixed Group
  219. * Fri May 18 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@vinelinux.org>
  220. - 1.1.9-1vl1
  221. - based on 1.1.9-1 generated from original tarball (by rpm -ts)
  222. - rebuilt for Vine Linux
  223. - modified spec file
  224. * Thu Oct 12 2000 Karl-Andre' Skevik <karls@inet.no>
  225. -use of macros for directory locations/paths
  226. -explicitly name documentation files
  227. -run chkconfig --del before files are deleted on uninstall
  228. * Wed Mar 10 1999 Karl-Andre' Skevik <karls@inet.no>
  229. - Integrated into CVS
  230. - socksify patch no longer needed
  231. * Thu Mar 04 1999 Oren Tirosh <oren@hishome.net>
  232. - configurable %{prefix}, fixed daemon init script
  233. - added /lib/libdl.so to socksify
  234. * Wed Mar 03 1999 Oren Tirosh <oren@hishome.net>
  235. - First spec file for Dante