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