Update of RedHat build scripts.
[tinc] / redhat / tinc.spec
1 Summary: tinc Virtual Private Network daemon
2 Name: tinc
3 Version: 1.0
4 Release: cvs
5 Copyright: GPL
6 Group: System Environment/Daemons
7 URL: http://tinc.nl.linux.org/
8 Source0: %{name}-%{version}-%{release}.tar.gz
9 Buildroot: /var/tmp/%{name}
10 #-%{version}-%{release}
11 #Requires: iproute
12 # for building the package the following is required:
13 # /usr/bin/texi2html /usr/bin/patch
14
15 %description
16 # taken from doc/tinc.texi
17 tinc is a Virtual Private Network (VPN) daemon that uses tunneling and
18 encryption to create a secure private network between hosts on the
19 Internet.
20
21 Because the tunnel appears to the IP level network code as a normal
22 network device, there is no need to adapt any existing software.
23
24 This tunneling allows VPN sites to share information with each other
25 over the Internet without exposing any information to others.
26
27 See http://tinc.nl.linux.org/
28
29 %prep
30
31 %setup -q -n %{name}-%{version}-%{release}
32
33 %build
34 ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
35 make
36 /usr/bin/texi2html doc/tinc.texi
37
38 %install
39 rm -rf $RPM_BUILD_ROOT
40 make install DESTDIR=$RPM_BUILD_ROOT
41 gzip $RPM_BUILD_ROOT/usr/info/tinc.info
42
43 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d/
44 cp redhat/tinc $RPM_BUILD_ROOT/etc/rc.d/init.d/
45
46 mkdir -p $RPM_BUILD_ROOT/etc/tinc/
47 touch $RPM_BUILD_ROOT/etc/tinc/nets.boot
48
49 %clean
50 rm -rf $RPM_BUILD_ROOT
51
52 %pre
53 %post
54
55 /sbin/chkconfig --add tinc
56
57 grep -q '^tinc[[:space:]]' /etc/services || patch -s /etc/services << END
58 *** services.org        Tue Apr 18 13:22:22 2000
59 --- services    Tue Apr 18 13:24:19 2000
60 ***************
61 *** 145,148 ****
62 --- 145,150 ----
63   hmmp-ind      612/tcp         dqs313_intercell# HMMP Indication / DQS
64   hmmp-ind      612/udp         dqs313_intercell# HMMP Indication / DQS
65 + tinc          655/tcp         TINC            # tinc vpn
66 + tinc          655/udp         TINC            # http://tinc.nl.linux.org/
67   #
68   # UNIX specific services
69 END
70
71 grep -q '^alias tap0' /etc/conf.modules || cat >> /etc/conf.modules << END
72 # tinc uses ethertap/netlink
73 alias tap0 ethertap
74 alias char-major-36 netlink_dev
75 alias char-major-10-200 tun
76 END
77 /sbin/install-info /usr/info/tinc.info.gz /usr/info/dir 
78
79 %preun
80 /sbin/install-info --delete /usr/info/tinc.info.gz /usr/info/dir
81
82 %postun
83
84 %files
85 %doc AUTHORS ChangeLog NEWS README THANKS *.html
86 %config /etc/tinc/
87 %attr(0755,root,root) /etc/rc.d/init.d/tinc
88 /usr/sbin/tincd
89 /usr/man/man5/tinc.conf.5
90 /usr/man/man8/tincd.8
91 /usr/info/tinc.info.gz