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