%define name ike %define version 2.1.5 %define release %mkrel 0.rc2.5 %define major 2 %define libname %mklibname %{name} %{major} Name: %{name} Version: %{version} Release: %{release} Summary: Ipsec client with GUI License: Shrew Soft Group: Networking/Remote access URL: http://www.shrew.net/ Source0: http://www.shrew.net/download/ike/%{name}-%{version}-rc-2.tbz2 Source1: iked.conf Source2: iked.init Source3: README.urpmi BuildRequires: openssl-devel BuildRequires: libldap-devel BuildRequires: flex BuildRequires: bison BuildRequires: cmake BuildRequires: qt3-devel BuildRequires: imagemagick BuildRoot: %{_tmppath}/%{name}-%{version} %description The Shrew Soft VPN Client for Unix is a free IPsec Client for FreeBSD, NetBSD and Linux based operating systems. This version is distributed under an OSI approved open source license and is hosted in a public subversion repository. It supports most of the features availalble in the Windows VPN Client version with the exception of those which are not cross platform compatible. %package -n qt-%{name} Summary: Qt GUI for ike vpn Group: Networking/Remote access Requires: %{name} = %{version}-%{release} %description -n qt-%{name} A Qt gui for the ike VPN client %package -n %{libname} Summary: Main library for ike Group: System/Libraries Provides: lib%{name} = %{version}-%{release} %description -n %{libname} This package contains the library needed to run programs dynamically linked with ike %prep %setup -q -n %{name} # strip away annoying ^M find . -type f|xargs file|grep 'CRLF'|cut -d: -f1|xargs perl -p -i -e 's/\r//' find . -type f|xargs file|grep 'text'|cut -d: -f1|xargs perl -p -i -e 's/\r//' %build # using cmake macro breaks build cmake . -DCMAKE_INSTALL_PREFIX=/usr \ -DETCDIR=/etc \ -DQTGUI=YES \ -DNATT=yes \ -DLDAP=yes \ -DTESTS=yes %make %install rm -rf %{buildroot} %makeinstall_std # Awfully ugly, have to find a better way to fix 64 libs %ifarch x86_64 mv %{buildroot}/usr/lib %{buildroot}%{_libdir} %endif %{__install} -m644 %{SOURCE1} -D %{buildroot}%{_sysconfdir}/iked.conf %{__install} -m755 %{SOURCE2} -D %{buildroot}%{_initrddir}/iked mkdir -p %{buildroot}%{_docdir}/%{name} %{__install} -m750 *.TXT -D %{buildroot}%{_docdir}/%{name} %{__install} -m750 %{SOURCE3} -D %{buildroot}%{_docdir}/%{name} mkdir -p %{buildroot}%{_iconsdir}/hicolor/{16x16,32x32,48x48,64x64}/apps install -m0644 source/ikea/png/ikea.png %{buildroot}%{_iconsdir}/hicolor/64x64/apps/%{name}.png convert -scale 48x48 source/ikea/png/ikea.png %{buildroot}%{_iconsdir}/hicolor/48x48/apps/%{name}.png convert -scale 32x32 source/ikea/png/ikea.png %{buildroot}%{_iconsdir}/hicolor/32x32/apps/%{name}.png convert -scale 16x16 source/ikea/png/ikea.png %{buildroot}%{_iconsdir}/hicolor/16x16/apps/%{name}.png #menu entry %{__mkdir_p} %{buildroot}%{_datadir}/applications %{__cat} > %{buildroot}%{_datadir}/applications/mandriva-qt-%{name}.desktop << EOF [Desktop Entry] Name=Qt Ike VPN Comment=Qt GUI for ike vpn Exec=%{_bindir}/ikea Icon=%{name} Terminal=false Type=Application Categories=Qt;Network; EOF %clean %{__rm} -rf %{buildroot} %if %mdkversion < 200900 %post %_post_service iked %endif %if %mdkversion < 200900 %preun %_preun_service iked %endif %files %defattr(0755,root,root) %doc %{_docdir}/%{name}/*.TXT %doc %{_docdir}/%{name}/README.urpmi %config(noreplace) %{_sysconfdir}/iked.conf %{_sysconfdir}/iked.conf.sample %{_initrddir}/iked %{_sbindir}/iked %{_mandir}/man5/*.5* %{_mandir}/man8/*.8* %files -n qt-ike %defattr(0755,root,root) %{_bindir}/ike* %{_datadir}/applications/mandriva-qt-ike.desktop %{_iconsdir}/hicolor/*/apps/%{name}.png %{_mandir}/man1/*.1* %files -n %{libname} %defattr(-, root, root) %{_libdir}/*.so.%{major}* %{_libdir}/*.so %changelog * Tue Aug 04 2009 Emmanuel Andry <eandry@mandriva.org> 2.1.5-0.rc2.5mdv2010.0 + Revision: 408717 - improve init script - BR imagemagick - add menu icon * Mon Aug 03 2009 Emmanuel Andry <eandry@mandriva.org> 2.1.5-0.rc2.4mdv2010.0 + Revision: 408608 - add net.ipv4.conf.default.rp_filter=0 in script to allow traffic into the tunnel - add a README.urpmi to warn users about this * Sun Aug 02 2009 Emmanuel Andry <eandry@mandriva.org> 2.1.5-0.rc2.3mdv2010.0 + Revision: 407551 - provide our own init script - provide our own init script * Fri Jul 31 2009 Emmanuel Andry <eandry@mandriva.org> 2.1.5-0.rc2.2mdv2010.0 + Revision: 405174 - fix provides * Fri Jul 31 2009 Emmanuel Andry <eandry@mandriva.org> 2.1.5-0.rc2.1mdv2010.0 + Revision: 404852 - workaround 64bits packaging, lib64 seems not to be handled. Needs an upstream report - clean buildroot before install - package doc files - import ike