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