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