Submitted by Mads Kiilerich.
[tinc] / redhat / tinc.spec
1 Summary: tinc vpn daemon
2 Name: tinc
3 Version: cvs_2000_04_17
4 Release: mk1
5 Copyright: GPL
6 Group: Networking
7 URL: http://tinc.nl.linux.org/
8 Source0: cabal.tgz
9 Source1: tinc
10 Buildroot: /var/tmp/%{name}-%{version}
11 #Requires: 
12
13 %description
14 tinc is cool!
15 See http://tinc.nl.linux.org/
16
17 %prep
18
19 %setup -q -n cabal
20
21 %build
22 autoconf
23 automake
24 ./configure --prefix=/usr --sysconfdir=/etc
25 make
26
27 %install
28 ME=my.vpn.ip.number
29 PEER=peer.vpn.ip.number
30 PEEREAL=peer.real.ip.number
31
32 rm -rf $RPM_BUILD_ROOT
33
34 make install DESTDIR=$RPM_BUILD_ROOT
35
36 install -D $RPM_SOURCE_DIR/tinc $RPM_BUILD_ROOT/etc/rc.d/init.d/
37
38 mkdir -p $RPM_BUILD_ROOT/etc/tinc/$PEER/passphrases
39 cat <<END >$RPM_BUILD_ROOT/etc/tinc/$PEER/tincd.conf
40 #sample
41 TapDevice = /dev/tap0
42 ConnectTo = $PEEREAL
43 MyVirtualIP = $ME/32
44 AllowConnect = no
45 END
46 cat <<END >$RPM_BUILD_ROOT/etc/tinc/$PEER/passphrases/local
47 128 0c647a1fd34da9d04c1d340ae9363f31
48 END
49 cat <<END >$RPM_BUILD_ROOT/etc/tinc/$PEER/passphrases/$PEER
50 128 aea5a5d414fea63ee3829b592afc0fba
51 END
52
53 %clean
54 rm -rf $RPM_BUILD_ROOT
55
56 %pre
57 %post
58
59 /sbin/chkconfig --add tinc
60
61 grep -q '^tinc[[:space:]]' /etc/services || patch -s /etc/services << END
62 *** services.org        Tue Apr 18 13:22:22 2000
63 --- services    Tue Apr 18 13:24:19 2000
64 ***************
65 *** 145,148 ****
66 --- 145,150 ----
67   hmmp-ind      612/tcp         dqs313_intercell# HMMP Indication / DQS
68   hmmp-ind      612/udp         dqs313_intercell# HMMP Indication / DQS
69 + tinc          655/tcp         TINC            # tinc vpn
70 + tinc          655/udp         TINC            # tinc.nl.linux.org
71   #
72   # UNIX specific services
73 END
74
75 %preun
76 %postun
77
78 %files
79
80 %doc AUTHORS ChangeLog NEWS README THANKS TODO
81
82 #%defattr(-,root,root)
83 %config /etc/tinc
84 /etc/rc.d
85 /usr/sbin
86 /usr/lib/tinc
87 /usr/man
88 /usr/info
89
90 %changelog
91 * Tue Apr 18 2000 Mads Kiileric <mads@kiilerich.com>
92 - initial rpm