Update copyrights.
[oweals/tinc.git] / redhat / tinc.spec
index 5419e8f4f8771e9a9a226ce4a384cfe0e5477dde..b7357d93de9ec0e2c729a3f8d9c482fe6e671838 100644 (file)
@@ -1,53 +1,50 @@
-Summary: tinc vpn daemon
+Summary: tinc Virtual Private Network daemon
 Name: tinc
 Version: 1.0
-Release: pre1
+Release: cvs
 Copyright: GPL
-Group: Networking
+Group: System Environment/Daemons
 URL: http://tinc.nl.linux.org/
-Source0: %{name}-%{version}.tar.gz
-Buildroot: /var/tmp/%{name}-%{version}-%{release}
-Requires: /usr/bin/texi2html /usr/bin/install /usr/bin/patch
+Source0: %{name}-%{version}-%{release}.tar.gz
+Buildroot: /var/tmp/%{name}
+#-%{version}-%{release}
+#Requires: iproute
+# for building the package the following is required:
+# /usr/bin/texi2html /usr/bin/patch
 
 %description
-tinc is cool!
+# taken from doc/tinc.texi
+tinc is a Virtual Private Network (VPN) daemon that uses tunneling and
+encryption to create a secure private network between hosts on the
+Internet.
+
+Because the tunnel appears to the IP level network code as a normal
+network device, there is no need to adapt any existing software.
+
+This tunneling allows VPN sites to share information with each other
+over the Internet without exposing any information to others.
+
 See http://tinc.nl.linux.org/
 
 %prep
 
-%setup -q -n %{name}-%{version}
+%setup -q -n %{name}-%{version}-%{release}
 
 %build
-#autoconf
-#automake
-./configure --prefix=/usr --sysconfdir=/etc
+./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
 make
-texi2html doc/tinc.texi
+/usr/bin/texi2html doc/tinc.texi
 
 %install
 rm -rf $RPM_BUILD_ROOT
 make install DESTDIR=$RPM_BUILD_ROOT
+gzip $RPM_BUILD_ROOT/usr/info/tinc.info
 
-install -D redhat/tinc $RPM_BUILD_ROOT/etc/rc.d/init.d/
+mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d/
+cp redhat/tinc $RPM_BUILD_ROOT/etc/rc.d/init.d/
 
-ME=my.vpn.ip.number
-PEER=peer.vpn.ip.number
-PEEREAL=peer.real.ip.number
-
-mkdir -p $RPM_BUILD_ROOT/etc/tinc/$PEER/passphrases
-cat <<END >$RPM_BUILD_ROOT/etc/tinc/$PEER/tincd.conf
-#sample
-TapDevice = /dev/tap0
-ConnectTo = $PEEREAL
-MyVirtualIP = $ME/32
-AllowConnect = no
-END
-cat <<END >$RPM_BUILD_ROOT/etc/tinc/$PEER/passphrases/local
-128 0c647a1fd34da9d04c1d340ae9363f31
-END
-cat <<END >$RPM_BUILD_ROOT/etc/tinc/$PEER/passphrases/$PEER
-128 aea5a5d414fea63ee3829b592afc0fba
-END
+mkdir -p $RPM_BUILD_ROOT/etc/tinc/
+touch $RPM_BUILD_ROOT/etc/tinc/nets.boot
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -66,26 +63,29 @@ grep -q '^tinc[[:space:]]' /etc/services || patch -s /etc/services << END
   hmmp-ind     612/tcp         dqs313_intercell# HMMP Indication / DQS
   hmmp-ind     612/udp         dqs313_intercell# HMMP Indication / DQS
 + tinc         655/tcp         TINC            # tinc vpn
-+ tinc         655/udp         TINC            # tinc.nl.linux.org
++ tinc         655/udp         TINC            # http://tinc.nl.linux.org/
   #
   # UNIX specific services
 END
 
+grep -q '^alias tap0' /etc/conf.modules || cat >> /etc/conf.modules << END
+# tinc uses ethertap/netlink
+alias tap0 ethertap
+alias char-major-36 netlink_dev
+alias char-major-10-200 tun
+END
+/sbin/install-info /usr/info/tinc.info.gz /usr/info/dir 
+
 %preun
+/sbin/install-info --delete /usr/info/tinc.info.gz /usr/info/dir
+
 %postun
 
 %files
-
 %doc AUTHORS ChangeLog NEWS README THANKS *.html
-
-#%defattr(-,root,root)
-%config /etc/tinc
-/etc/rc.d
-/usr/sbin
-/usr/lib/tinc
-/usr/man
-/usr/info
-
-%changelog
-* Tue Apr 18 2000 Mads Kiileric <mads@kiilerich.com>
-- initial rpm
+%config /etc/tinc/
+%attr(0755,root,root) /etc/rc.d/init.d/tinc
+/usr/sbin/tincd
+/usr/man/man5/tinc.conf.5
+/usr/man/man8/tincd.8
+/usr/info/tinc.info.gz