| 1 | # spec file for IPDB | 
|---|
| 2 | # $Id: ipdb.spec 433 2010-07-16 21:48:19Z kdeugau $ | 
|---|
| 3 |  | 
|---|
| 4 | %define errata 99 | 
|---|
| 5 |  | 
|---|
| 6 | # A collection of magic to set the release "number" such that dist upgrades will, erm, upgrade. | 
|---|
| 7 | %if %{?debdist:0}%{?!debdist:1} | 
|---|
| 8 | %define debdist etch | 
|---|
| 9 | %endif | 
|---|
| 10 | %if "%{debdist}" == "sarge" | 
|---|
| 11 | %define errata 0 | 
|---|
| 12 | %endif | 
|---|
| 13 | %if "%{debdist}" == "dapper" | 
|---|
| 14 | %define errata 1 | 
|---|
| 15 | %endif | 
|---|
| 16 | %if "%{debdist}" == "etch" | 
|---|
| 17 | %define errata 2 | 
|---|
| 18 | %endif | 
|---|
| 19 | %if "%{debdist}" == "lenny" | 
|---|
| 20 | %define errata 3 | 
|---|
| 21 | %endif | 
|---|
| 22 | %if "%{debdist}" == "squeeze" | 
|---|
| 23 | %define errata 4 | 
|---|
| 24 | %endif | 
|---|
| 25 | %if %{?relnum:0}%{?!relnum:1} | 
|---|
| 26 | %define relnum 1 | 
|---|
| 27 | %endif | 
|---|
| 28 |  | 
|---|
| 29 | %define release %{relnum}.%{errata}%{debdist} | 
|---|
| 30 |  | 
|---|
| 31 | Summary: IP Database | 
|---|
| 32 | Name: ipdb | 
|---|
| 33 | Version: #VERSION# | 
|---|
| 34 | Release: %{release} | 
|---|
| 35 | Group: Applications/System | 
|---|
| 36 | Source: ipdb-#VERSION#.tar.gz | 
|---|
| 37 | Packager: Kris Deugau <kdeugau@deepnet.cx> | 
|---|
| 38 | BuildRoot: /var/tmp/%{name}-%{version} | 
|---|
| 39 | License: GPL 3+ | 
|---|
| 40 | BuildArch: noarch | 
|---|
| 41 | Requires: perl(NetAddr::IP) >= 4, perl(DBD:Pg) | 
|---|
| 42 | %if %{_vendor} == "debbuild" | 
|---|
| 43 | Recommends: perl(Sys::SigAction) | 
|---|
| 44 | %endif | 
|---|
| 45 |  | 
|---|
| 46 | %description | 
|---|
| 47 | A web-based IP address allocation management tool | 
|---|
| 48 |  | 
|---|
| 49 | %prep | 
|---|
| 50 | %setup | 
|---|
| 51 |  | 
|---|
| 52 | %build | 
|---|
| 53 |  | 
|---|
| 54 | %install | 
|---|
| 55 | # le sigh.  rpm's makeinstall macro includes the buildroot in the dirs, so it will break here.  :/ | 
|---|
| 56 | make \ | 
|---|
| 57 | prefix=%{_prefix} \ | 
|---|
| 58 | exec_prefix=%{_exec_prefix} \ | 
|---|
| 59 | bindir=%{_bindir} \ | 
|---|
| 60 | sbindir=%{_sbindir} \ | 
|---|
| 61 | sysconfdir=%{_sysconfdir} \ | 
|---|
| 62 | datadir=%{_datadir} \ | 
|---|
| 63 | includedir=%{_includedir} \ | 
|---|
| 64 | libdir=%{_libdir} \ | 
|---|
| 65 | libexecdir=%{_libexecdir} \ | 
|---|
| 66 | localstatedir=%{_localstatedir} \ | 
|---|
| 67 | sharedstatedir=%{_sharedstatedir} \ | 
|---|
| 68 | mandir=%{_mandir} \ | 
|---|
| 69 | infodir=%{_infodir} \ | 
|---|
| 70 | install DESTDIR=$RPM_BUILD_ROOT | 
|---|
| 71 |  | 
|---|
| 72 | %clean | 
|---|
| 73 | if [ "$RPM_BUILD_ROOT" != "/" ]; then | 
|---|
| 74 | rm -rf $RPM_BUILD_ROOT | 
|---|
| 75 | fi | 
|---|
| 76 |  | 
|---|
| 77 | %files | 
|---|
| 78 | %{_libdir}/ipdb | 
|---|
| 79 | %attr(-,-,0755) %{_libdir}/ipdb/cgi-bin/*.cgi | 
|---|
| 80 | %attr(-,-,0755) %{_libdir}/ipdb/cgi-bin/*.pl | 
|---|
| 81 | %attr(-,-,0755) %{_libdir}/ipdb/cgi-bin/extras/*.pl | 
|---|
| 82 | %config %{_sysconfdir}/ipdb/MyIPDB.pm | 
|---|
| 83 | %{_sysconfdir}/ipdb | 
|---|
| 84 |  | 
|---|
| 85 | %changelog | 
|---|
| 86 | * Mon Jun 28 2010  Kris Deugau <kdeugau@deepnet.cx> 2.6-1 | 
|---|
| 87 | - Initial package | 
|---|