%define name ipplan %define version 4.31 %define release 3mdk Summary: IP address management and tracking Name: %{name} Version: %{version} Release: %{release} Group: System/Servers License: GPL URL: http://sourceforge.net/projects/iptrack/ Source0: http://prdownloads.sourceforge.net/iptrack/%{name}-%{version}.tar.bz2 Patch0: ipplan-mdk_conf.diff.bz2 Requires: apache-mod_php >= 2.0.54 Requires: php-adodb >= 1:4.64-1mdk Requires: nmap BuildRequires: apache-base >= 2.0.54-5mdk BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version} %description IPplan is a Web-based, multilingual IP address management and tracking tool based on PHP which simplifies the administration of your IP address space. It can handle a single network or multiple networks with overlapping address spaces. It features internationalization, importing of network definitions from routing tables, importing of definitions from TAB-delimited files and NMAP's XML format, support for multiple administrators with different access profiles (per group, per customer, per network etc.), definitions of address space authority boundaries per group, finding free address space across a range, display of overlapping address spaces between networks, search capabilities, an audit log, statistics, and tracking and sending SWIP/registrar information. %prep %setup -q -n %{name} %patch0 -p0 # clean up CVS stuff for i in `find . -type d -name CVS` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do if [ -e "$i" ]; then rm -r $i; fi >&/dev/null done # fix dir perms find . -type d | xargs chmod 755 # fix file perms find . -type f | xargs chmod 644 # use external adodb find . -name "*.php*" | xargs perl -pi -e "s|\"adodb/adodb.inc.php\"|\"%{_datadir}/php-adodb/adodb.inc.php\"|g" find . -name "*.php*" | xargs perl -pi -e "s|\"\.\./adodb/adodb.inc.php\"|\"%{_datadir}/php-adodb/adodb.inc.php\"|g" # strip away annoying ^M find . -type f | perl -ne 'chomp; print "$_\n" if -T $_' | xargs perl -pi -e 'tr/\r//d' %build %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} install -d %{buildroot}%{_var}/www/%{name} cp -aRf * %{buildroot}%{_var}/www/%{name} install -d %{buildroot}%{_localstatedir}/ipplan/uploads install -d %{buildroot}%{_localstatedir}/ipplan/dns # cleanup rm -rf %{buildroot}%{_var}/www/%{name}/adodb rm -rf %{buildroot}%{_var}/www/%{name}/contrib rm -f %{buildroot}%{_var}/www/%{name}/CHANGELOG rm -f %{buildroot}%{_var}/www/%{name}/CONTRIBUTORS rm -f %{buildroot}%{_var}/www/%{name}/DNS-USAGE rm -f %{buildroot}%{_var}/www/%{name}/INSTALL* rm -f %{buildroot}%{_var}/www/%{name}/INTERNALS rm -f %{buildroot}%{_var}/www/%{name}/LICENSE rm -f %{buildroot}%{_var}/www/%{name}/README* rm -f %{buildroot}%{_var}/www/%{name}/TODO rm -f %{buildroot}%{_var}/www/%{name}/TRANSLATIONS rm -f %{buildroot}%{_var}/www/%{name}/UPGRADE rm -f %{buildroot}%{_var}/www/%{name}/TRIGGERS rm -f %{buildroot}%{_var}/www/%{name}/messages.po # apache configuration install -d -m 755 %{buildroot}%{_sysconfdir}/httpd/conf/webapps.d cat > %{buildroot}%{_sysconfdir}/httpd/conf/webapps.d/%{name}.conf <<EOF # %{name} Apache configuration file Alias /%{name} %{_var}/www/%{name} <Directory %{_var}/www/%{name}> Allow from all </Directory> EOF %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %post %_post_webapp %postun %_postun_webapp %files %defattr(-,root,root) %doc contrib CHANGELOG CONTRIBUTORS DNS-USAGE INSTALL INSTALL-POSTGRESQL %doc INTERNALS README README.html TODO TRANSLATIONS UPGRADE TRIGGERS messages.po %config(noreplace) %{_sysconfdir}/httpd/conf/webapps.d/%{name}.conf %attr(0644,root,root) %config(noreplace) %{_var}/www/%{name}/config.php %{_var}/www/%{name} %attr(0755,apache,apache) %dir %{_localstatedir}/ipplan %attr(0755,apache,apache) %dir %{_localstatedir}/ipplan/uploads %attr(0755,apache,apache) %dir %{_localstatedir}/ipplan/dns %changelog * Wed Jun 29 2005 Guillaume Rousse <guillomovitch@mandriva.org> 4.31-3mdk - use new adodb - drop redundant requires - use perl instead of dos2unix to fix encoding - install in %{_var}/www/%{name} - let rpm compute dependencies * Sun May 15 2005 Oden Eriksson <oeriksson@mandriva.com> 4.31-2mdk - provide 2 forgotten directories * Thu May 12 2005 Oden Eriksson <oeriksson@mandriva.com> 4.31-1mdk - 4.31 * Mon May 09 2005 Oden Eriksson <oeriksson@mandriva.com> 4.30-2mdk - use slightly better ^M stripper - fix deps * Mon May 09 2005 Oden Eriksson <oeriksson@mandriva.com> 4.30-1mdk - 4.30 * Sat Apr 09 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.26-1mdk - 4.26 (Major security fixes) * Tue Mar 29 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.25-1mdk - 4.25 * Thu Mar 03 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.04-1mdk - 4.04 - strip away annoying ^M * Sat Nov 20 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.02-1mdk - 4.02 - speeded up the "build" process * Mon May 31 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.02-1mdk - initial cooker contrib