]> git.ipfire.org Git - people/ms/strongswan.git/blame - packaging/redhat/rpm.in
(no commit message)
[people/ms/strongswan.git] / packaging / redhat / rpm.in
CommitLineData
997358a6
MW
1# fairly minimal RPM spec file, does only packaging
2# Based on work by Paul Lahaie of Steamballoon.
3# This file is touched up by sed (in the Makefile) before it is actually used.
4Summary: Kernel with FreeS/WAN
5Name: freeswan
6Version: @IPSECVERSION@_@KERNELVERSION@
7Release: 0
8Copyright: GPL
9Source: freeswan-%{version}.tar.gz
10Group: System Environment/Daemons
11BuildRoot: /var/tmp/%{name}-%{PACKAGE_VERSION}-root
12%define __spec_install_post /usr/lib/rpm/brp-compress || :
13%define KernelVer @KERNELVERSIONORIG@
14Requires: ipsec-userland ipsec-kernel
15
16%package userland
17Summary: Kernel with FreeS/WAN
18Group: System Environment/Daemons
19Provides: ipsec-userland
20Requires: ipsec-kernel
21
22%package module
23Summary: FreeS/Wan kernel module
24Group: System Environment/Kernel
25Provides: ipsec-kernel
26# do not make the dependancy circular for now.
27#Requires: ipsec-userland
28
29%description userland
30This package contains the daemons and userland tools for setting up
31FreeS/WAN on a freeswan enabled kernel.
32
33%description module
34This package contains only the ipsec module for the RedHat series of kernels.
35
36%description
37A dummy package that installs userland and kernel pieces.
38
39%prep
40
41%build
42
43%install
44
45%clean
46rm -rf ${RPM_BUILD_ROOT}
47
48%files userland
49%defattr(-,root,root)
50@PUBDIR@/ipsec
51@FINALBINDIR@/*
52@FINALLIBDIR@/*
53/etc/rc.d/init.d/ipsec
54
55%attr(0644,root,root) %config @FINALCONFDIR@/ipsec.conf
56%attr(0644,root,root) %config @FINALCONFDDIR@/policies/clear
57%attr(0644,root,root) %config @FINALCONFDDIR@/policies/private
58%attr(0644,root,root) %config @FINALCONFDDIR@/policies/block
59%attr(0644,root,root) %config @FINALCONFDDIR@/policies/private-or-clear
60%attr(0644,root,root) %config @FINALCONFDDIR@/policies/clear-or-private
61
62%doc @MANTREE@/man3/*
63%doc @MANTREE@/man5/*
64%doc @MANTREE@/man8/*
65%doc @FINALEXAMPLECONFDIR@/*
66
67%files module
68%defattr (-,root,root)
69/lib/modules/%{KernelVer}/kernel/net/ipsec
70
71%pre userland
72if [ -f /etc/ipsec.conf ]
73then
74 cp -f --backup=t /etc/ipsec.conf /etc/ipsec.conf.prerpm > /dev/null 2> /dev/null
75fi
76
77%preun userland
78sh /etc/rc.d/init.d/ipsec stop || exit 0
79
80%postun module
81# This is a kludge to handle the fact that ipsec.o is not deleted
82# on plain jane RPM uninstall.
83for i in /lib/modules/*@KERNELVERSIONORIG@*
84 do
85 mv -f --backup=t "$i"/kernel/net/ipsec/ipsec.o "$i"/kernel/net/ipsec/ipsec.o.rpmbak > /dev/null 2> /dev/null
86 done || exit 0
87
88%post module
89# Same RPM uninstall kludge.
90for i in /lib/modules/*@KERNELVERSIONORIG@*
91 do
92 mv -f --backup=t "$i"/kernel/net/ipsec/ipsec.o "$i"/kernel/net/ipsec/ipsec.o.rpmbak > /dev/null 2> /dev/null
93 done
94echo "do not forget to install the userland utilities"
95exit 0
96
97%post userland
98chkconfig --add ipsec
99echo "invoke \"service ipsec start\" or reboot to begin"
100
101%changelog
102#
103# $Log: rpm.in,v $
104# Revision 1.1 2004/03/15 20:35:27 as
105# added files from freeswan-2.04-x509-1.5.3
106#
107# Revision 1.6 2003/01/30 23:31:34 sam
108#
109# dhr contributed changes. still may need modification, but I'm committing
110# before I leave.
111#
112# Revision 1.5 2003/01/14 22:03:44 sam
113# include policy files in RPM.
114#
115# Revision 1.4 2003/01/04 07:38:11 build
116# *** empty log message ***
117#
118# Revision 1.3 2002/12/12 05:45:41 sam
119# new template file from 1.99 pulled up in part
120#
121# Revision 1.2.2.1 2002/12/07 23:47:22 sam
122# merging in a few 1.99 rpm.in changes.
123#
124# Revision 1.2 2002/10/30 06:54:15 sam
125# Updates to take into account lib vs libexec - so we don't miss files.
126#
127# Revision 1.1 2002/10/06 08:35:54 sam
128# RPM template
129#
130# Revision 1.9 2002/06/16 21:53:49 mcr
131# added missing clauses to userland section.
132#
133# Revision 1.8 2002/06/16 20:18:41 mcr
134# 2.00 series RPM will have a "freeswan-userland" rather than
135# a "freeswan-X" RPM. Among other things, it makes regexp easier
136# to locate the different pieces.
137#
138# Revision 1.7 2002/06/11 23:10:53 mcr
139# added dependancies from userland->kernel.
140# cross-dependancies considered but cause too much user pain.
141#
142# Revision 1.6 2002/06/09 15:46:41 mcr
143# move installed modules for make rpm to kernel versioned directory.
144#
145# Revision 1.5 2002/04/11 02:50:30 mcr
146# added %post to make ipsec start, and %post to shut it down.
147# added %changelog as well.
148#
149#