home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / N / TCPIP / SLACKBUI < prev    next >
Encoding:
Text File  |  1995-04-20  |  12.9 KB  |  435 lines

  1. #!/bin/sh
  2. # Set initial variables:
  3. CWD=`pwd`
  4. if [ "$TMP" = "" ]; then
  5.   TMP=/tmp
  6. fi
  7. PKG=$TMP/package-tcpip
  8. SRC=/devel/manpagesrc
  9. INFO=/devel/info-pages/usr/info
  10. TEX=/devel/texinfo-docs
  11.  
  12. if [ ! -d $TMP ]; then
  13.   mkdir -p $TMP # location to build the source
  14. fi
  15. if [ ! -d $PKG ]; then
  16.   mkdir -p $PKG # place for the package to be built
  17. fi
  18.  
  19. # Explode the package framework:
  20. cd $PKG
  21. tar xzvf $CWD/_tcpip.tar.gz
  22.  
  23. # Function to handle manpage source:
  24. man2gz () { # $1 is source page name, $2 is target name for preformatted
  25.             # output (full path && name) and $3 is the same, but for the
  26.             # source.
  27.   mkdir -p `dirname $2`
  28.   groff -Tascii -mandoc $1 | gzip -9c > $2
  29.   if [ ! "$3" = "" ]; then
  30.     mkdir -p `dirname $3`
  31.     cat $1 > $3 
  32.   fi 
  33. }
  34.  
  35. echo "+==================+"
  36. echo "| net-tools-1.1.79 |"
  37. echo "+==================+"
  38. cd $TMP
  39. tar xzvf $CWD/net-tools-1.1.79.tar.gz
  40. cd net-tools
  41. zcat $CWD/net-tools-1.1.79.diff.gz | patch
  42. touch config.h
  43. make
  44. cat arp > $PKG/sbin/arp
  45. cat ifconfig > $PKG/sbin/ifconfig
  46. cat plipconfig > $PKG/sbin/plipconfig
  47. cat rarp > $PKG/sbin/rarp
  48. cat route > $PKG/sbin/route
  49. # cat hostname > $PKG/bin/hostname # same binary already comes with util-linux
  50. cat netstat > $PKG/bin/netstat
  51. cat slattach > $PKG/usr/sbin/slattach
  52. cd man
  53. man2gz arp.8 $PKG/usr/man/preformat/cat8/arp.8.gz
  54. #man2gz dnsdomainname.1 $PKG/usr/man/preformat/cat1/dnsdomainname.1.gz
  55. ( cd $SRC/usr/man/man1 ; ln -sf hostname.1.gz dnsdomainname.1.gz )
  56. man2gz hostname.1 $PKG/usr/man/preformat/cat1/hostname.1.gz
  57. man2gz ifconfig.8 $PKG/usr/man/preformat/cat8/ifconfig.8.gz
  58. man2gz netstat.8 $PKG/usr/man/preformat/cat8/netstat.8.gz
  59. man2gz plipconfig.8 $PKG/usr/man/preformat/cat8/plipconfig.8.gz
  60. man2gz rarp.8 $PKG/usr/man/preformat/cat8/rarp.8.gz
  61. man2gz resolver.5 $PKG/usr/man/preformat/cat5/resolver.5.gz
  62. man2gz route.8 $PKG/usr/man/preformat/cat8/route.8.gz
  63. man2gz slattach.8 $PKG/usr/man/preformat/cat8/slattach.8.gz
  64.  
  65. echo "+===============+"
  66. echo "| NetKit-B-0.05 |"
  67. echo "+===============+"
  68. cd $TMP
  69. tar xzvf $CWD/NetKit-B-0.05.tar.gz
  70. cd NetKit-B-0.05
  71. zcat $CWD/NetKit-B-0.05.diff.gz | patch
  72. make
  73. cd fingerd
  74. cat fingerd > $PKG/usr/sbin/in.fingerd
  75. man2gz fingerd.8 $PKG/usr/man/preformat/cat8/in.fingerd.8.gz $SRC/usr/man/man8/in.fingerd.8
  76. cd ../ftp
  77. cat ftp > $PKG/bin/ftp
  78. man2gz ftp.1 $PKG/usr/man/preformat/cat1/ftp.1.gz $SRC/usr/man/man1/ftp.1
  79. cd ../inetd
  80. cat inetd > $PKG/usr/sbin/inetd
  81. man2gz inetd.8 $PKG/usr/man/preformat/cat8/inetd.8.gz $SRC/usr/man/man8/inetd.8
  82. cd ../ping
  83. cat ping > $PKG/bin/ping
  84. man2gz ping.8 $PKG/usr/man/preformat/cat8/ping.8.gz $SRC/usr/man/man8/ping.8
  85. cd ../portmap
  86. man2gz portmap.8 $PKG/usr/man/preformat/cat8/portmap.8.gz $SRC/usr/man/man8/portmap.8
  87. cd ../rcp
  88. cat rcp > $PKG/usr/bin/rcp
  89. man2gz rcp.1 $PKG/usr/man/preformat/cat1/rcp.1.gz $SRC/usr/man/man1/rcp.1
  90. cd ../rexecd
  91. cat rexecd > $PKG/usr/sbin/in.rexecd
  92. man2gz rexecd.8 $PKG/usr/man/preformat/cat8/rexecd.8.gz $SRC/usr/man/man8/rexecd.8
  93. cd ../rlogin
  94. cat rlogin > $PKG/usr/bin/rlogin
  95. man2gz rlogin.1 $PKG/usr/man/preformat/cat1/rlogin.1.gz $SRC/usr/man/man1/rlogin.1
  96. cd ../rlogind
  97. cat rlogind > $PKG/usr/sbin/in.rlogind
  98. man2gz rlogind.8 $PKG/usr/man/preformat/cat8/in.rlogind.8.gz $SRC/usr/man/man8/in.rlogind.8
  99. cd ../routed
  100. cat routed > $PKG/usr/sbin/routed
  101. man2gz routed.8 $PKG/usr/man/preformat/cat8/routed.8.gz $SRC/usr/man/man8/routed.8
  102. cd ../rpc.rusersd
  103. cat rusersd > $PKG/usr/sbin/rpc.rusersd
  104. man2gz rpc.rusersd.8 $PKG/usr/man/preformat/cat8/rpc.rusersd.8.gz $SRC/usr/man/man8/rpc.rusersd.8
  105. cd ../rpc.rwalld
  106. cat rwalld > $PKG/usr/sbin/rpc.rwalld
  107. man2gz rpc.rwalld.8 $PKG/usr/man/preformat/cat8/rpc.rwalld.8.gz $SRC/usr/man/man8/rpc.rwalld.8
  108. cd ../rpcgen.new
  109. cat rpcgen > $PKG/usr/bin/rpcgen
  110. man2gz rpcgen.1 $PKG/usr/man/preformat/cat1/rpcgen.1.gz $SRC/usr/man/man1/rpcgen.1
  111. cd ../rpcinfo
  112. cat rpcinfo > $PKG/usr/sbin/rpcinfo
  113. man2gz rpcinfo.8 $PKG/usr/man/preformat/cat8/rpcinfo.8.gz $SRC/usr/man/man8/rpcinfo.8
  114. cd ../rsh
  115. cat rsh > $PKG/usr/bin/rsh
  116. man2gz rsh.1 $PKG/usr/man/preformat/cat1/rsh.1.gz $SRC/usr/man/man1/rsh.1
  117. cd ../rshd
  118. cat rshd > $PKG/usr/sbin/in.rshd
  119. man2gz rshd.8 $PKG/usr/man/preformat/cat8/in.rshd.gz $SRC/usr/man/man8/in.rshd.8
  120. cd ../rusers
  121. cat rusers > $PKG/usr/bin/rusers
  122. man2gz rusers.1 $PKG/usr/man/preformat/cat1/rusers.1.gz $SRC/usr/man/man1/rusers.1
  123. cd ../rwall
  124. cat rwall > $PKG/usr/bin/rwall
  125. man2gz rwall.1 $PKG/usr/man/preformat/cat1/rwall.1.gz $SRC/usr/man/man1/rwall.1
  126. cd ../rwho
  127. cat rwho > $PKG/usr/bin/rwho
  128. man2gz rwho.1 $PKG/usr/man/preformat/cat1/rwho.1.gz $SRC/usr/man/man1/rwho.1
  129. cd ../sliplogin
  130. cat sliplogin > $PKG/usr/sbin/sliplogin
  131. man2gz sliplogin.8 $PKG/usr/man/preformat/cat8/sliplogin.8.gz $SRC/usr/man/man8/sliplogin.8
  132. cd ../talk
  133. cat talk > $PKG/usr/bin/talk
  134. man2gz talk.1 $PKG/usr/man/preformat/cat1/talk.1.gz $SRC/usr/man/man1/talk.1
  135. cd ../talkd
  136. cat talkd > $PKG/usr/sbin/in.talkd
  137. man2gz talkd.8 $PKG/usr/man/preformat/cat8/in.talkd.8.gz $SRC/usr/man/man8/in.talkd.8
  138. cd ../telnet
  139. cat telnet > $PKG/bin/telnet
  140. man2gz telnet.1 $PKG/usr/man/preformat/cat1/telnet.1.gz $SRC/usr/man/man1/telnet.1
  141. cd ../telnetd
  142. cat telnetd > $PKG/usr/sbin/in.telnetd
  143. man2gz telnetd.8 $PKG/usr/man/preformat/cat8/in.telnetd.8.gz $SRC/usr/man/man8/in.telnetd.8
  144. cd ../tftp
  145. cat tftp > $PKG/usr/bin/tftp
  146. man2gz tftp.1 $PKG/usr/man/preformat/cat1/tftp.1.gz $SRC/usr/man/man1/tftp.1
  147. cd ../tftpd
  148. cat tftpd > $PKG/usr/sbin/in.tftpd
  149. man2gz tftpd.8 $PKG/usr/man/preformat/cat8/in.tftpd.8.gz $SRC/usr/man/man8/in.tftpd.8
  150. cd ../timed/timed
  151. cat timed > $PKG/usr/sbin/in.timed
  152. man2gz timed.8 $PKG/usr/man/preformat/cat8/timed.8.gz $SRC/usr/man/man8/timed.8
  153. cd ../timedc
  154. cat timedc > $PKG/usr/sbin/timedc
  155. man2gz timedc.8 $PKG/usr/man/preformat/cat8/timedc.8.gz $SRC/usr/man/man8/timedc.8
  156.  
  157. echo "+========+"
  158. echo "| finger |"
  159. echo "+========+"
  160. cd $TMP
  161. tar xzvf $CWD/finger.tar.gz
  162. cd finger
  163. make
  164. cat finger > $PKG/usr/bin/finger
  165. man2gz finger.1 $PKG/usr/man/preformat/cat1/finger.1.gz $SRC/usr/man/man1/finger.1
  166.  
  167. echo "+===========+"
  168. echo "| portmap_3 |"
  169. echo "+===========+"
  170. cd $TMP
  171. tar xzvf $CWD/portmap_3.tar.gz
  172. cd portmap_3
  173. make
  174. strip portmap pmap_dump pmap_set
  175. cat portmap > $PKG/usr/sbin/rpc.portmap
  176. cat pmap_dump > $PKG/usr/sbin/pmap_dump
  177. cat pmap_set > $PKG/usr/sbin/pmap_set
  178.  
  179. echo "+=============+"
  180. echo "| fwhois-1.00 |"
  181. echo "+=============+"
  182. cd $TMP
  183. tar xzvf $CWD/fwhois-1.00.tar.gz
  184. cd fwhois-1.00
  185. make
  186. cat fwhois > $PKG/usr/bin/fwhois
  187.  
  188. echo "+================+"
  189. echo "| popclient-2.21 |"
  190. echo "+================+"
  191. cd $TMP
  192. tar xzvf $CWD/popclient-2.21.tar.gz
  193. cd pop
  194. make
  195. strip popclient
  196. cat popclient > $PKG/usr/bin/popclient
  197. man2gz popclient.1L $PKG/usr/man/preformat/cat1/popclient.1.gz $SRC/usr/man/man1/popclient.1
  198.  
  199. echo "+=============+"
  200. echo "| ruptime-570 |"
  201. echo "+=============+"
  202. cd $TMP
  203. tar xzvf $CWD/ruptime-570.tar.gz
  204. cd ruptime
  205. make
  206. cat ruptime > $PKG/usr/bin/ruptime
  207. man2gz ruptime.1 $PKG/usr/man/preformat/cat1/ruptime.1.gz $SRC/usr/man/man1/ruptime.1
  208.  
  209. echo "+===============+"
  210. echo "| NetKit-A-0.06 |"
  211. echo "+===============+"
  212. cd $TMP
  213. tar xzvf $CWD/NetKit-A-0.06.tar.gz
  214. cd NetKit-A-0.06
  215. make
  216. cd ytalk-3.0.1
  217. cp Makefile.old Makefile
  218. make CFLAGS=-O2 LDFLAGS=-s
  219. cat ytalk > $PKG/usr/bin/ytalk
  220. man2gz ytalk.1 $PKG/usr/man/preformat/cat1/ytalk.1.gz $SRC/usr/man/man1/ytalk.1
  221. cd ../pidentd-2.2
  222. strip in.identd
  223. cat in.identd > $PKG/usr/sbin/in.identd
  224. man2gz identd.8 $PKG/usr/man/preformat/cat8/in.identd.8.gz $SRC/usr/man/man8/in.identd.8
  225. cd ../nfs-server-2.0
  226. cat rpc.mountd > $PKG/usr/sbin/rpc.mountd
  227. cat rpc.nfsd > $PKG/usr/sbin/rpc.nfsd
  228. cat showmount > $PKG/usr/sbin/showmount
  229. man2gz mountd.8 $PKG/usr/man/preformat/cat8/mountd.8.gz $SRC/usr/man/man8/mountd.8
  230. man2gz nfsd.8 $PKG/usr/man/preformat/cat8/nfsd.8.gz $SRC/usr/man/man8/nfsd.8
  231. man2gz showmount.8 $PKG/usr/man/preformat/cat8/showmount.8.gz $SRC/usr/man/man8/showmount.8
  232. man2gz exports.5 $PKG/usr/man/preformat/cat5/exports.5.gz $SRC/usr/man/man5/exports.5
  233. cd ../tcp_wrapper-6.3
  234. strip tcpd safe_finger try try-from
  235. cat tcpd > $PKG/usr/sbin/tcpd
  236. make clean
  237. make REAL_DAEMON_DIR=/usr/sbin/real-daemon-dir linux
  238. strip tcpd safe_finger try try-from
  239. cat tcpd > $PKG/usr/sbin/real-daemon-dir/tcpd
  240. cat safe_finger > $PKG/usr/sbin/real-daemon-dir/safe_finger
  241. cat try > $PKG/usr/sbin/real-daemon-dir/try
  242. cat try-from > $PKG/usr/sbin/real-daemon-dir/try-from
  243. cd ../traceroute-4.4BSD
  244. cc -s -o traceroute traceroute.o
  245. cat traceroute > $PKG/usr/bin/traceroute
  246. man2gz traceroute.8 $PKG/usr/man/preformat/cat8/traceroute.8.gz $SRC/usr/man/man8/traceroute.8
  247.  
  248. echo "+=============+"
  249. echo "| wu-ftpd-2.4 |"
  250. echo "+=============+"
  251. cd $TMP
  252. tar xzvf $CWD/wu-ftpd-2.4.tar.gz
  253. cd wu-ftpd-2.4
  254. zcat $CWD/wu-ftpd-2.4.diff.gz | patch
  255. build lnx
  256. cd bin
  257. strip *
  258. cat ckconfig > $PKG/usr/sbin/ckconfig
  259. cat ftpcount > $PKG/usr/bin/ftpcount
  260. cat ftpd > $PKG/usr/sbin/wu.ftpd
  261. cat ftpshut > $PKG/usr/bin/ftpshut
  262. cat ftpwho > $PKG/usr/bin/ftpwho
  263. cd ../doc
  264. man2gz ftpaccess.5 $PKG/usr/man/preformat/cat5/ftpaccess.5.gz $SRC/usr/man/man5/ftpaccess.5
  265. man2gz ftpconversions.5 $PKG/usr/man/preformat/cat5/ftpconversions.5.gz $SRC/usr/man/man5/ftpconversions.5
  266. man2gz ftpcount.1 $PKG/usr/man/preformat/cat1/ftpcount.1.gz $SRC/usr/man/man1/ftpcount.1
  267. man2gz ftpd.8 $PKG/usr/man/preformat/cat8/wu.ftpd.8.gz $SRC/usr/man/man8/wu.ftpd.8
  268. man2gz ftphosts.5 $PKG/usr/man/preformat/cat5/ftphosts.5.gz $SRC/usr/man/man5/ftphosts.5
  269. man2gz ftpshut.8 $PKG/usr/man/preformat/cat8/ftpshut.8.gz $SRC/usr/man/man8/ftpshut.8
  270. man2gz ftpwho.1 $PKG/usr/man/preformat/cat1/ftpwho.1.gz $SRC/usr/man/man1/ftpwho.1
  271. man2gz realpath.3 $PKG/usr/man/preformat/cat3/realpath.3.gz $SRC/usr/man/man3/realpath.3
  272. man2gz xferlog.5 $PKG/usr/man/preformat/cat5/xferlog.5.gz $SRC/usr/man/man5/xferlog.5
  273.  
  274. echo "+============+"
  275. echo "| yp-clients |"
  276. echo "+============+"
  277. cd $TMP
  278. tar xzvf $CWD/yp-clients.tar.gz
  279. cd yp.bin
  280. make
  281. strip ypbind
  282. cat ypbind > $PKG/usr/sbin/ypbind
  283. cd domainname
  284. strip domainname
  285. cat domainname > $PKG/bin/domainname-yp
  286. cd ../ypcat
  287. strip ypcat
  288. cat ypcat > $PKG/usr/bin/ypcat
  289. cd ../ypmatch
  290. strip ypmatch
  291. cat ypmatch > $PKG/usr/bin/ypmatch
  292. cd ../yppoll
  293. strip yppoll
  294. cat yppoll > $PKG/usr/bin/yppoll
  295. cd ../ypset
  296. strip ypset
  297. cat ypset > $PKG/usr/bin/ypset
  298. cd ../ypwhich
  299. strip ypwhich
  300. cat ypwhich > $PKG/usr/bin/ypwhich
  301.  
  302. echo "+==============+"
  303. echo "| telnetsnoopd |"
  304. echo "+==============+"
  305. cd $TMP
  306. tar xzvf $CWD/telnetsnoopd.tar.gz
  307. cd telnetsnoopd
  308. make
  309. cat telnetsnoopd/telnetd > $PKG/usr/sbin/in.telnetsnoopd
  310.  
  311. echo "+===============+"
  312. echo "| ttysnoop-0.11 |"
  313. echo "+===============+"
  314. cd $TMP
  315. tar xzvf $CWD/ttysnoop-0.11.tar.gz
  316. cd ttysnoop-0.11
  317. make
  318. strip ttysnoop ttysnoops
  319. cat ttysnoops > $PKG/bin/ttysnoops
  320. cat ttysnoop > $PKG/usr/sbin/ttysnoop
  321. man2gz ttysnoop.8 $PKG/usr/man/preformat/cat8/ttysnoop.8.gz $SRC/usr/man/man8/ttysnoop.8
  322.  
  323. echo "+==============+"
  324. echo "| netdate-1.16 |"
  325. echo "+==============+"
  326. cd $TMP
  327. tar xzvf $CWD/netdate-1.16.tar.gz
  328. cd netdate
  329. make
  330. strip netdate
  331. cat netdate > $PKG/usr/sbin/netdate
  332. man2gz netdate.8 $PKG/usr/man/preformat/cat8/netdate.8.gz $SRC/usr/man/man8/netdate.8
  333.  
  334. echo "+===============+"
  335. echo "| linux_pcnfsd2 |"
  336. echo "+===============+"
  337. cd $TMP
  338. tar xzvf $CWD/linux_pcnfsd2.tar.gz
  339. cd pcnfsd_linux2
  340. make -f Makefile.linux
  341. cd linux
  342. strip clnt.pcnfsd rpc.pcnfsd
  343. cat clnt.pcnfsd > $PKG/usr/sbin/clnt.pcnfsd
  344. cat rpc.pcnfsd > $PKG/usr/sbin/rpc.pcnfsd
  345.  
  346. echo "+=======+"
  347. echo "| rwhod |"
  348. echo "+=======+"
  349. cd $TMP
  350. tar xzvf $CWD/rwhod-519.tar.gz
  351. cd rwhod
  352. make
  353. cat rwhod > $PKG/usr/sbin/rwhod
  354. man2gz rwhod.8 $PKG/usr/man/preformat/cat8/rwhod.8.gz $SRC/usr/man/man8/rwhod.8
  355.  
  356. echo "+========+"
  357. echo "| bwnfsd |"
  358. echo "+========+"
  359. cd $TMP
  360. tar xzvf $CWD/bwnfsd.tar.gz
  361. cd bwnfsd
  362. make linux
  363. strip bwnfsd
  364. cat bwnfsd > $PKG/usr/sbin/rpc.bwnfsd
  365.  
  366. echo "+===============+"
  367. echo "| nntp-1.5.11tp |"
  368. echo "+===============+"
  369. cd $TMP
  370. tar xzvf $CWD/nntp-1.5.11tp-linux.tar.gz
  371. cd nntp.1.5.11t
  372. zcat $CWD/nntp-1.5.11tp-linux.diff.gz | patch -p1
  373. make server
  374. cd server
  375. strip nntpd
  376. cat nntpd > $PKG/usr/sbin/in.nntpd
  377. man2gz $CWD/nntpd.8 $PKG/usr/man/preformat/cat8/in.nntpd.8.gz $SRC/usr/man/man8/in.nntpd
  378. cd ..
  379. make client
  380. cd inews
  381. strip inews
  382. cat inews > $PKG/usr/bin/inews-nntp
  383.  
  384. echo "+==============+"
  385. echo "| pop3d-1.00.4 |"
  386. echo "+==============+"
  387. cd $TMP
  388. tar xzvf $CWD/pop3d-1.00.4.tar.gz
  389. cd pop3d
  390. make
  391. cat pop3d > $PKG/usr/sbin/in.pop3d
  392. mkdir -p $PKG/usr/man/preformat/cat8
  393. gzip -9c pop3d.man > $PKG/usr/man/preformat/cat8/in.pop3d.8.gz
  394.  
  395. echo "+===========+"
  396. echo "| ncftp 183 |"
  397. echo "+===========+"
  398. cd $TMP
  399. tar xzvf $CWD/ncftp183.tar.gz
  400. cd ncftp183/readline-2.0
  401. configure --prefix=/usr
  402. make CFLAGS=-O2 LDFLAGS=-s
  403. cd ..
  404. make
  405. cat ncftp > $PKG/usr/bin/ncftp
  406. man2gz ncftp.1 $PKG/usr/man/preformat/cat1/ncftp.1.gz $SRC/usr/man/man1/ncftp.1
  407.  
  408. # Build the package:
  409. cd $PKG
  410. tar czvf $TMP/tcpip.tgz .
  411.  
  412. # Clean up the extra stuff:
  413. if [ "$1" = "--cleanup" ]; then
  414.   rm -rf $TMP/net-tools
  415.   rm -rf $TMP/NetKit-B-0.05
  416.   rm -rf $TMP/NetKit-A-0.06
  417.   rm -rf $TMP/finger
  418.   rm -rf $TMP/portmap_3
  419.   rm -rf $TMP/fwhois-1.00
  420.   rm -rf $TMP/pop
  421.   rm -rf $TMP/wu-ftpd-2.4
  422.   rm -rf $TMP/telnetsnoopd
  423.   rm -rf $TMP/ttysnoop-0.11
  424.   rm -rf $TMP/netdate
  425.   rm -rf $TMP/pcnfsd_linux2
  426.   rm -rf $TMP/rwhod
  427.   rm -rf $TMP/bwnfsd
  428.   rm -rf $TMP/nntp.1.5.11t
  429.   rm -rf $TMP/pop3d
  430.   rm -rf $TMP/ncftp183
  431.   rm -rf $TMP/ruptime
  432.   rm -rf $TMP/yp.bin
  433.   rm -rf $PKG
  434. fi
  435.