]> git.meshlink.io Git - meshlink/blob - redhat/tinc.spec
Update Depends lines to reflect the dependencies on OpenSSL
[meshlink] / redhat / tinc.spec
1 Summary: tinc Virtual Private Network daemon
2 Name: tinc
3 Version: 1.0pre3
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 Requires: iproute
11 # for building the package the following is required:
12 # /usr/bin/texi2html /usr/bin/patch
13
14 %description
15 # taken from doc/tinc.texi
16 tinc is a Virtual Private Network (VPN) daemon that uses tunneling and
17 encryption to create a secure private network between hosts on the
18 Internet.
19
20 Because the tunnel appears to the IP level network code as a normal
21 network device, there is no need to adapt any existing software.
22
23 This tunneling allows VPN sites to share information with each other
24 over the Internet without exposing any information to others.
25
26 See http://tinc.nl.linux.org/
27
28 %prep
29
30 %setup -q -n %{name}-%{version}
31
32 %build
33 ./configure --prefix=/usr --sysconfdir=/etc
34 make
35 /usr/bin/texi2html doc/tinc.texi
36
37 %install
38 rm -rf $RPM_BUILD_ROOT
39 make install DESTDIR=$RPM_BUILD_ROOT
40 gzip $RPM_BUILD_ROOT/usr/info/tinc.info
41
42 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d/
43 cp redhat/tinc $RPM_BUILD_ROOT/etc/rc.d/init.d/
44
45 ME=my.vpn.ip.number
46 PEER=peer.vpn.ip.number
47 PEEREAL=peer.real.ip.number
48
49 umask 077
50 mkdir -p $RPM_BUILD_ROOT/etc/tinc/$PEER/passphrases
51 cat <<END >$RPM_BUILD_ROOT/etc/tinc/$PEER/tinc.conf
52 # Sample tinc configuration. 
53 # Insert your own ip numbers instead of the placeholders,
54 # and be sure to use your own passphrases.
55 # See man tinc.conf(5) tincd(8) genauth(8), info tinc and 
56 # /usr/doc/%{name}-%{version}/tinc.conf.sample
57 TapDevice = /dev/tap0
58 ConnectTo = $PEEREAL
59 MyVirtualIP = $ME/32
60 AllowConnect = no
61 END
62 cat <<END >$RPM_BUILD_ROOT/etc/tinc/$PEER/passphrases/local
63 1024 c1da5b633b428d783fec96ac89bb6bd4ed97ac673942706ba2240cde977158b7cd5f4055b7db70a7365d1f8df6a1a7c9dbb73f4e2bf8484fc14aee68d0f950e2bce82dd2a6386f040546a61e77cd1c25265ce03182e4e2c9a00ae0ea2f1f89ac04a10f7b67312187b5d2d74618803974ba6f053116b1460bc194c652dc28c84a
64 END
65 cat <<END >$RPM_BUILD_ROOT/etc/tinc/$PEER/passphrases/$PEER
66 1024 9dff58799827c3ae73699d9d4029cf80ee4cfd3a8408495cdb68c78dec602c46f362aedeea80928384254bc7d0bfbf9756c0783b5ec9943161863530a8861947147d124286e8c46fd98af988c96ba65c63acefc01f6c03b6b8f7d9897acb02c083adb7416ee5ccbc19610a8b9ade2599d8f66e94c715f2e1a15054a78a3f3260
67 END
68
69 %clean
70 rm -rf $RPM_BUILD_ROOT
71
72 %pre
73 %post
74
75 /sbin/chkconfig --add tinc
76
77 grep -q '^tinc[[:space:]]' /etc/services || patch -s /etc/services << END
78 *** services.org        Tue Apr 18 13:22:22 2000
79 --- services    Tue Apr 18 13:24:19 2000
80 ***************
81 *** 145,148 ****
82 --- 145,150 ----
83   hmmp-ind      612/tcp         dqs313_intercell# HMMP Indication / DQS
84   hmmp-ind      612/udp         dqs313_intercell# HMMP Indication / DQS
85 + tinc          655/tcp         TINC            # tinc vpn
86 + tinc          655/udp         TINC            # http://tinc.nl.linux.org/
87   #
88   # UNIX specific services
89 END
90
91 grep -q '^alias tap0' /etc/conf.modules || cat >> /etc/conf.modules << END
92 # tinc uses ethertap/netlink
93 alias tap0 ethertap
94 alias char-major-36 netlink_dev
95 END
96 /sbin/install-info /usr/info/tinc.info.gz /usr/info/dir 
97
98 %preun
99 /sbin/install-info --delete /usr/info/tinc.info.gz /usr/info/dir
100
101 %postun
102
103 %files
104 %doc AUTHORS ChangeLog NEWS README THANKS *.html doc/tinc.conf.sample
105 %config /etc/tinc/
106 %attr(0755,root,root) /etc/rc.d/init.d/tinc
107 /usr/sbin/genauth
108 /usr/sbin/tincd
109 /usr/lib/tinc/
110 /usr/man/man5/tinc.conf.5
111 /usr/man/man8/genauth.8
112 /usr/man/man8/tincd.8
113 /usr/info/tinc.info.gz