AutoReqProv: no %define debug_package %{nil} %define svn 0.1.3 Summary: A web based interface for openvpn servers Name: openvpn-web Version: 0.1.3 Release: 1.6 URL: http://openvpn-web-gui.sourceforge.net/ Packager: Atomic Rocket Turtle, http://www.atomicrocketturtle.com Vendor: Scott R. Shinn #Source0: http://prdownloads.sourceforge.net/openvpn-web-gui/%{name}-%{version}.tar.gz Source0: openvpn-%{svn}.tar.gz Source1: openvpn.conf # this was to add smarty into the include path Source2: openvpn.ini Patch0: config.patch Patch1: centos-updates.patch License: GPL Group: Networking/Tunnels BuildRoot: %{_tmppath}/%{name}-%(id -un) BuildRequires: pam-devel Requires: openvpn httpd php Requires: php-Smarty >= 2.6.26 # TODO that ming thing, makensis, and scons. From epel Requires: mingw32-nsis >= 2.45 Requires: scons Requires: unix2dos Requires: mutt Requires: glibc-devel, zlib-devel, Requires: /usr/bin/uuencode Obsoletes: openvpn-web-gui %description Openvpn-web-gui is a Web interface to openvpn server. It shows the status of VPN connections, and openvpn / openssl configuration. Moreover, it provides client certificate management. Project is being written completely on PHP 5 with-openssl and Smarty. %prep %setup -q -n openvpn %patch0 -p1 %patch1 -p1 %build #make pam gcc -g -o www/status/pam/check_user www/status/pam/check_user.c -lpam -lpam_misc %install [ %{buildroot} != "/" ] && rm -rf %{buildroot} # clean out svn #find . -name .svn -exec rm -rf {} \; >/dev/null 2>&1 %{__mkdir_p} -m 755 %{buildroot}/etc/ %{__mkdir_p} -m 755 %{buildroot}/etc/php.d/ %{__mkdir_p} -m 755 %{buildroot}/etc/pam.d/ %{__mkdir_p} -m 755 %{buildroot}/usr/share/openvpn-web/ %{__mkdir_p} -m 755 %{buildroot}/usr/share/openvpn-web/openvpn %{__mkdir_p} -m 755 %{buildroot}/usr/share/openvpn-web/tmp %{__mkdir_p} -m 755 %{buildroot}/%{_sysconfdir}/httpd/conf.d/ #%{__mkdir_p} %{buildroot}/%{_sysconfdir}/openvpn/config/ #%{__mkdir_p} %{buildroot}/%{_sysconfdir}/php.d/ cp -a . %{buildroot}/usr/share/openvpn-web/ %{__install} -m 0644 setup/openvpncertmgmt.conf %{buildroot}/etc/ %{__install} -m 0755 setup/check_user %{buildroot}/etc/pam.d/ %{__install} -m 644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/httpd/conf.d/ # rm -f %{buildroot}/usr/share/openvpn-web/clients/downloadRequests.txt touch %{buildroot}/usr/share/openvpn-web/clients/downloadRequests.txt # plugins/win32installer/local.inc <- makensis windows executable maker?? # yes this exists in ming %{__install} -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/php.d/ #%{__cp} -r www/* %{buildroot}/usr/share/%{name}/ #%{__cp} -r examples/* %{buildroot}/%{_sysconfdir}/openvpn/config/ # # /etc/openvpn has to be writable by apache # same here: /usr/share/openvpn-web-gui/ %clean [ %{buildroot} != "/" ] && rm -rf %{buildroot} %post # TODO sudoers if ! grep -q openvpn-web /etc/sudoers ; then echo "apache ALL=NOPASSWD:/usr/share/openvpn-web/scripts/install-local.sh" >> /etc/sudoers fi if [ -d /usr/share/openvpn/easy-rsa ]; then ln -sf /usr/share/openvpn/easy-rsa /etc/openvpn/easy-rsa elif [ -d /usr/share/openvpn/easy-rsa/2.0/ ]; then # FC6 ln -sf /usr/share/openvpn/easy-rsa/2.0/ /etc/openvpn/easy-rsa fi if [ ! -d /etc/openvpn/keys ]; then mkdir /etc/openvpn/keys fi if [ ! -d /etc/openvpn/keys/newpem ]; then mkdir /etc/openvpn/keys/newpem fi touch /etc/openvpn/keys/database.txt chown apache.apache /etc/openvpn/keys/database.txt chown apache.apache /etc/openvpn/keys/newpem %preun %files %defattr(-,root,root) %config /etc/openvpncertmgmt.conf %{_datadir}/openvpn-web/ #%attr(-,apache,apache) /etc/openvpn/* %attr(-,apache,apache) %{_datadir}/openvpn-web/easy-rsa/keys %attr(-,apache,apache) %{_datadir}/openvpn-web/openvpn %attr(-,apache,apache) %{_datadir}/openvpn-web/servers %attr(-,apache,apache) %{_datadir}/openvpn-web/clients %attr(-,apache,apache) %{_datadir}/openvpn-web/tmp %attr(-,apache,apache) %{_datadir}/openvpn-web/www/status/templates_c/ %attr(-,apache,apache) %{_datadir}/openvpn-web/www/status/plugins/win32installer/src/openvpn-2.1.1/install-win32/openvpn.nsi %attr(-,apache,apache) %{_datadir}/openvpn-web/www/status/plugins/win32installer/src/openvpn-2.1.1/install-win32/ %attr(-,apache,apache) %{_datadir}/openvpn-web/www/status/plugins/win32installer/tmp %attr(-,apache,apache) %{_datadir}/openvpn-web/www/status/plugins/win32installer/src/openvpn-2.1.1/text/INSTALL-win32.txt %attr(-,apache,apache) %{_datadir}/openvpn-web/windows/ /etc/php.d/openvpn.ini /etc/httpd/conf.d/openvpn.conf /etc/pam.d/check_user %changelog * Thu Aug 12 0000 Scott R. Shinn - 0.1.3-0.6 - Added Requires: uuencode * Thu Aug 12 2010 Scott R. Shinn - 0.1.3-0.5 - Added php-Smarty requirement * Wed Aug 4 2010 Scott R. Shinn - 0.1.3-0.2 - Replaced references to "todos" command with unix2dos in server/client install scripts - Fixed paths in client script to use a writable directory - Made /usr/share/openvpn-web/clients writable by apache - Temporarily removed references to apt-get in install.sh, - Made yum install event for clients non-interactive * Wed Aug 4 2010 Scott R. Shinn - ASL integration changes to work with TPE - Fixed path issues with installer scripts - Added new directories to support installation - Changed packagename to "openvpn-web" & added obsoletes on openvpn-web-gui * Wed May 19 2010 Scott R. Shinn - Merged in code from the new gui project, http://sourceforge.net/projects/openvpncertmgmt/ * Tue Apr 11 2007 Scott R. Shinn - added ovpn client file generation patch - Lots of path tweaking - initial release