*** empty log message ***
[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: /usr/bin/texi2html /usr/bin/install /usr/bin/patch
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 texi2html doc/tinc.texi
26
27 %install
28 rm -rf $RPM_BUILD_ROOT
29 make install DESTDIR=$RPM_BUILD_ROOT
30
31 install -D redhat/tinc $RPM_BUILD_ROOT/etc/rc.d/init.d/
32
33 ME=my.vpn.ip.number
34 PEER=peer.vpn.ip.number
35 PEEREAL=peer.real.ip.number
36
37 mkdir -p $RPM_BUILD_ROOT/etc/tinc/$PEER/passphrases
38 cat <<END >$RPM_BUILD_ROOT/etc/tinc/$PEER/tincd.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
79 %doc AUTHORS ChangeLog NEWS README THANKS TODO *.html
80
81 #%defattr(-,root,root)
82 %config /etc/tinc
83 /etc/rc.d
84 /usr/sbin
85 /usr/lib/tinc
86 /usr/man
87 /usr/info
88
89 %changelog
90 * Tue Apr 18 2000 Mads Kiileric <mads@kiilerich.com>
91 - initial rpm