# (oe) undefining these makes the build _real_ quick. %undefine __find_provides %undefine __find_requires %define name ipplan %define version 4.26 %define release 1mdk %define webadminroot /var/www/html/admin 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 BuildRoot: %{_tmppath}/%{name}-buildroot Requires: webserver php-common php-mysql mod_php ADOdb BuildRequires: file BuildArch: noarch Prefix: %{webadminroot} %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} # 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\"|\"%{_libdir}/adodb/adodb.inc.php\"|g" find . -name "*.php*" | xargs perl -pi -e "s|\"\.\./adodb/adodb.inc.php\"|\"%{_libdir}/adodb/adodb.inc.php\"|g" # 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 %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} install -d %{buildroot}%{webadminroot}/%{name} cp -aRf * %{buildroot}%{webadminroot}/%{name}/ # cleanup rm -rf %{buildroot}%{webadminroot}/%{name}/adodb rm -rf %{buildroot}%{webadminroot}/%{name}/contrib rm -f %{buildroot}%{webadminroot}/%{name}/CHANGELOG rm -f %{buildroot}%{webadminroot}/%{name}/CONTRIBUTORS rm -f %{buildroot}%{webadminroot}/%{name}/DNS-USAGE rm -f %{buildroot}%{webadminroot}/%{name}/INSTALL* rm -f %{buildroot}%{webadminroot}/%{name}/INTERNALS rm -f %{buildroot}%{webadminroot}/%{name}/LICENSE rm -f %{buildroot}%{webadminroot}/%{name}/README* rm -f %{buildroot}%{webadminroot}/%{name}/TODO rm -f %{buildroot}%{webadminroot}/%{name}/TRANSLATIONS rm -f %{buildroot}%{webadminroot}/%{name}/UPGRADE rm -f %{buildroot}%{webadminroot}/%{name}/TRIGGERS rm -f %{buildroot}%{webadminroot}/%{name}/messages.po %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr(-,root,root) %doc contrib CHANGELOG CONTRIBUTORS DNS-USAGE INSTALL INSTALL-POSTGRESQL %doc INTERNALS README README.html TODO TRANSLATIONS UPGRADE TRIGGERS messages.po %attr(0644,root,root) %config(noreplace) %{webadminroot}/%{name}/config.php %{webadminroot}/%{name} %changelog * 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