[ike/f15/master] * initial import

topdog topdog at fedoraproject.org
Tue Mar 15 09:57:00 UTC 2011


commit 6b94519d7c004721790b161b22e3392b3a54b962
Author: Andrew Colin Kissa <andrew at topdog.za.net>
Date:   Tue Mar 15 11:49:32 2011 +0200

     * initial import

 .gitignore            |    1 +
 ike-2.1.7-cmake.patch |   42 ++++++++++++++++++
 ike.desktop           |    9 ++++
 ike.logrotate         |    9 ++++
 ike.spec              |  116 +++++++++++++++++++++++++++++++++++++++++++++++++
 iked.init             |  105 ++++++++++++++++++++++++++++++++++++++++++++
 sources               |    1 +
 7 files changed, 283 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..44d54c1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/ike-2.1.7-release.tbz2
diff --git a/ike-2.1.7-cmake.patch b/ike-2.1.7-cmake.patch
new file mode 100644
index 0000000..ec26bcb
--- /dev/null
+++ b/ike-2.1.7-cmake.patch
@@ -0,0 +1,42 @@
+diff -up ike/source/libidb/CMakeLists.txt.cm ike/source/libidb/CMakeLists.txt
+--- ike/source/libidb/CMakeLists.txt.cm	2008-04-30 07:20:56.000000000 +0200
++++ ike/source/libidb/CMakeLists.txt	2010-10-14 21:45:51.866778135 +0200
+@@ -22,3 +22,7 @@ set_target_properties(
+ 	idb PROPERTIES
+ 	VERSION ${RELVER}
+ 	SOVERSION ${RELVER} )
++
++install(
++	TARGETS idb
++	LIBRARY DESTINATION ${PATH_LIB} )
+diff -up ike/source/libip/CMakeLists.txt.cm ike/source/libip/CMakeLists.txt
+--- ike/source/libip/CMakeLists.txt.cm	2008-02-18 21:52:08.000000000 +0100
++++ ike/source/libip/CMakeLists.txt	2010-10-14 21:45:51.867652548 +0200
+@@ -29,3 +29,6 @@ set_target_properties(
+ 	VERSION ${RELVER}
+ 	SOVERSION ${RELVER} )
+ 
++install(
++	TARGETS ip
++	LIBRARY DESTINATION ${PATH_LIB} )
+diff -up ike/source/libith/CMakeLists.txt.cm ike/source/libith/CMakeLists.txt
+--- ike/source/libith/CMakeLists.txt.cm	2010-10-14 21:48:37.996777883 +0200
++++ ike/source/libith/CMakeLists.txt	2010-10-14 21:49:19.349777956 +0200
+@@ -29,3 +29,7 @@ set_target_properties(
+ 	ith PROPERTIES
+ 	VERSION ${RELVER}
+ 	SOVERSION ${RELVER} )
++
++install(
++	TARGETS ith
++	LIBRARY DESTINATION ${PATH_LIB} )
+diff -up ike/source/liblog/CMakeLists.txt.cm ike/source/liblog/CMakeLists.txt
+--- ike/source/liblog/CMakeLists.txt.cm	2007-10-11 18:40:51.000000000 +0200
++++ ike/source/liblog/CMakeLists.txt	2010-10-14 21:45:51.868652074 +0200
+@@ -20,3 +20,6 @@ set_target_properties(
+ 	VERSION ${RELVER}
+ 	SOVERSION ${RELVER} )
+ 
++install(
++	TARGETS log
++	LIBRARY DESTINATION ${PATH_LIB} )
diff --git a/ike.desktop b/ike.desktop
new file mode 100644
index 0000000..7f35e00
--- /dev/null
+++ b/ike.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Shrew Soft VPN Access Manager
+GenericName=Shrew Soft VPN Access Manager
+Comment=Application to manage remote VPN site configurations
+Exec=/usr/bin/ikea
+Icon=ikea
+Terminal=false
+Type=Application
+Categories=Network;
diff --git a/ike.logrotate b/ike.logrotate
new file mode 100644
index 0000000..8da625b
--- /dev/null
+++ b/ike.logrotate
@@ -0,0 +1,9 @@
+/var/log/%{name}/*.log {
+       weekly
+       rotate 10
+       copytruncate
+       delaycompress
+       compress
+       notifempty
+       missingok
+}
diff --git a/ike.spec b/ike.spec
new file mode 100644
index 0000000..901df61
--- /dev/null
+++ b/ike.spec
@@ -0,0 +1,116 @@
+Name:           ike
+Version:        2.1.7
+Release:        4%{?dist}
+Summary:        Shrew Soft VPN Client For Linux
+Group:          Applications/Communications
+License:        Sleepycat
+URL:            http://www.shrew.net/
+Source0:        http://www.shrew.net/download/%{name}/%{name}-%{version}-release.tbz2
+Source1:        iked.init
+Source2:        ike.desktop
+Source3:        ike.logrotate
+Patch0:         ike-2.1.7-cmake.patch
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires:  cmake flex bison qt3-devel openldap-devel openssl-devel
+BuildRequires:  desktop-file-utils
+Requires(post): chkconfig
+Requires(preun): chkconfig
+Requires(preun): initscripts
+
+%description
+This free IPSEC VPN client can be used to communicate with 
+Open Source IPSEC VPN servers as well as some commercial
+IPSEC VPN servers.
+
+%prep
+%setup -q -n %{name}
+%patch0 -p1 -b .cm
+
+sed -i 's:/var/log/:/var/log/iked/:' source/iked/iked.conf.sample
+sed -i 's/\r//' TODO.TXT
+
+%build
+%cmake -DQTGUI=YES -DNATT=YES -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DETCDIR:PATH=%{_sysconfdir} \
+      -DMANDIR:PATH=%{_mandir} -DLDAP=YES -DLIBDIR=%{_libdir}
+make VERBOSE=1 %{?_smp_mflags}
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+make INSTALL="install -p" install DESTDIR=$RPM_BUILD_ROOT
+
+install -d -p $RPM_BUILD_ROOT%{_initrddir}
+install -d -p $RPM_BUILD_ROOT%{_localstatedir}/run/%{name}d
+install -d -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}d
+install -d -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
+install -D -p -m0755 %SOURCE1 $RPM_BUILD_ROOT%{_initrddir}/%{name}d
+mv $RPM_BUILD_ROOT%{_sysconfdir}/iked.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/iked.conf
+
+# Create desktop file
+install -p source/ikea/png/ikea.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}a.png
+desktop-file-install --dir $RPM_BUILD_ROOT/%{_datadir}/applications \
+    %{SOURCE2}
+
+# Create /etc/logrotate.d/ike
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
+install -m 0644 -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%preun
+if [ $1 = 0 ] ; then
+    /sbin/service %{name}d stop >/dev/null 2>&1
+    /sbin/chkconfig --del %{name}d
+fi
+
+%post
+/sbin/ldconfig
+/sbin/chkconfig --add %{name}d
+/sbin/service %{name}d start >/dev/null 2>&1
+
+%postun
+/sbin/ldconfig
+if [ "$1" -ge "1" ] ; then
+    /sbin/service %{name}d condrestart >/dev/null 2>&1 || :
+fi
+
+%files
+%defattr(-,root,root,-)
+%doc LICENSE.TXT TODO.TXT
+%config(noreplace) %{_sysconfdir}/iked.conf
+%config(noreplace) %{_sysconfdir}/logrotate.d/ike
+%{_libdir}/*.so.*
+%{_libdir}/*.so
+%{_initrddir}/%{name}d
+%{_bindir}/*
+%{_sbindir}/*
+%{_mandir}/man*/*
+%{_datadir}/pixmaps/*
+%{_datadir}/applications/*
+%dir %{_localstatedir}/run/%{name}d
+%dir %{_localstatedir}/log/%{name}d
+
+%changelog
+* Sun Mar 13 2011 Andrew Colin Kissa <andrew at topdog.za.net> - 2.1.7-4
+- fix perms on logrotate file
+
+* Sat Feb 12 2011 Andrew Colin Kissa <andrew at topdog.za.net> - 2.1.7-3
+- Cleanup minor rpmlint errors
+
+* Thu Oct 14 2010 Jochen Schmitt <Jochen herr-schmitt de> - 2.1.7-2
+- Fix cmake related issues
+
+* Wed Oct 13 2010 Jochen Schmitt <Jochen herr-schmitt de> - 2.1.7-1
+- New upstream release
+
+* Thu Mar 04 2010 Andrew Colin Kissa <andrew at topdog.za.net> - 2.1.5-2
+- Fix source miss packaging
+
+* Tue Dec 15 2009 Andrew Colin Kissa <andrew at topdog.za.net> - 2.1.5-1
+- Upgrade to new upstream release
+- Use cmake macro
+
+* Wed Aug 19 2009 Andrew Colin Kissa <andrew at topdog.za.net> - 2.1.5-0.1.rc2
+- Initial packaging
diff --git a/iked.init b/iked.init
new file mode 100644
index 0000000..5fc3975
--- /dev/null
+++ b/iked.init
@@ -0,0 +1,105 @@
+#!/bin/sh
+#
+# Shrew VPN daemon iked
+#
+# chkconfig:   - 20 80
+# description: The Shrew VPN client requires the ike daemon \
+#	       to run before being able to connect.
+
+### BEGIN INIT INFO
+# Provides: iked
+# Required-Start: $local_fs $network
+# Required-Stop: $local_fs $network
+# Should-Start: 
+# Should-Stop: 
+# Default-Start: 3 4 5
+# Default-Stop: 0 1 2 3 4 5 6
+# Short-Description: start and stop Shrew VPN iked daemon
+# Description: Shrew VPN Client iked daemon
+### END INIT INFO
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+exec="/usr/sbin/iked"
+prog="iked"
+config="/etc/iked.conf"
+
+lockfile=/var/lock/subsys/iked
+
+start() {
+    [ -x $exec ] || exit 5
+    [ -f $config ] || exit 6
+    echo -n $"Starting Shrew Soft IKE daemon $prog: "
+    # if not running, start it up here, usually something like "daemon $exec"
+    daemon $exec --config $config
+    retval=$?
+    echo
+    [ $retval -eq 0 ] && touch $lockfile
+    return $retval
+}
+
+stop() {
+    echo -n $"Stopping Shrew Soft IKE daemon $prog: "
+    # stop it here, often "killproc $prog"
+    killproc $prog
+    retval=$?
+    echo
+    [ $retval -eq 0 ] && rm -f $lockfile
+    return $retval
+}
+
+restart() {
+    stop
+    start
+}
+
+reload() {
+    restart
+}
+
+force_reload() {
+    restart
+}
+
+rh_status() {
+    # run checks to determine if the service is running or use generic status
+    status $prog
+}
+
+rh_status_q() {
+    rh_status >/dev/null 2>&1
+}
+
+
+case "$1" in
+    start)
+        rh_status_q && exit 0
+        $1
+        ;;
+    stop)
+        rh_status_q || exit 0
+        $1
+        ;;
+    restart)
+        $1
+        ;;
+    reload)
+        rh_status_q || exit 7
+        $1
+        ;;
+    force-reload)
+        force_reload
+        ;;
+    status)
+        rh_status
+        ;;
+    condrestart|try-restart)
+        rh_status_q || exit 0
+        restart
+        ;;
+    *)
+        echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+        exit 2
+esac
+exit $?
diff --git a/sources b/sources
index e69de29..7159bcf 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+bc86e101809fc750013e18480c8c1040  ike-2.1.7-release.tbz2


More information about the scm-commits mailing list