1 | # spec file for DNS Administrator
|
---|
2 | # $Id: dnsadmin.spec 219 2012-01-13 23:11:38Z kdeugau $
|
---|
3 |
|
---|
4 | # A collection of magic for packaging with debbuild (https://secure.deepnet.cx/trac/debbuild
|
---|
5 | # Sets the release "number" such that dist upgrades will upgrade in the right order.
|
---|
6 | %if "%{debdist}" == "sarge"
|
---|
7 | %define errata 0
|
---|
8 | %endif
|
---|
9 | %if "%{debdist}" == "dapper"
|
---|
10 | %define errata 1
|
---|
11 | %endif
|
---|
12 | %if "%{debdist}" == "etch"
|
---|
13 | %define errata 2
|
---|
14 | %endif
|
---|
15 | %if "%{debdist}" == "lenny"
|
---|
16 | %define errata 3
|
---|
17 | %endif
|
---|
18 | %if "%{debdist}" == "squeeze"
|
---|
19 | %define errata 4
|
---|
20 | %endif
|
---|
21 | %if %{?relnum:0}%{?!relnum:1}
|
---|
22 | %define relnum 1
|
---|
23 | %endif
|
---|
24 |
|
---|
25 | # redefine release only if debdist is defined
|
---|
26 | %if %{?debdist:1}%{?!debdist:0}
|
---|
27 | %define release %{relnum}.%{errata}%{debdist}
|
---|
28 | %else
|
---|
29 | %define release 1
|
---|
30 | %endif
|
---|
31 |
|
---|
32 | # handle flag for parallel-versions installs.
|
---|
33 | %if %{?para_versions:1}%{?!para_versions:0}
|
---|
34 | %define pkg_leaf dnsdb-%{version}
|
---|
35 | %define cfg_leaf dnsdb/%{version}
|
---|
36 | %else
|
---|
37 | %define pkg_leaf dnsdb
|
---|
38 | %define cfg_leaf dnsdb
|
---|
39 | %endif
|
---|
40 |
|
---|
41 | Summary: DeepNet DNS Administrator
|
---|
42 | Name: dnsadmin
|
---|
43 | Version: #VERSION#
|
---|
44 | Release: %{release}
|
---|
45 | Group: Applications/System
|
---|
46 | Source: %{name}-%{version}.tar.gz
|
---|
47 | Packager: Kris Deugau <kdeugau@deepnet.cx>
|
---|
48 | BuildRoot: /var/tmp/%{name}-%{version}
|
---|
49 | License: GPL 3+
|
---|
50 | BuildArch: noarch
|
---|
51 |
|
---|
52 | # not absolutely required:
|
---|
53 | Requires: perl(NetAddr::IP) >= 4
|
---|
54 |
|
---|
55 | # rpmbuild should fill in the rest of the deps. Debian's tools aren't so friendly. :/
|
---|
56 |
|
---|
57 | %if %{_vendor} == "debbuild"
|
---|
58 | # ah, Debian, how we do *love* thee so... *eyeroll*
|
---|
59 | Requires: libfrontier-rpc-perl >= 0.07b4, perl(CGI::Simple), perl(HTML::Template), perl(Net::DNS)
|
---|
60 | Requires: perl(CGI::Session), perl(Crypt::PasswdMD5), perl(Digest::MD5), perl(Net::Whois::Raw)
|
---|
61 | %endif
|
---|
62 |
|
---|
63 | %description
|
---|
64 | A web-based DNS management tool
|
---|
65 |
|
---|
66 | %prep
|
---|
67 | %setup
|
---|
68 |
|
---|
69 | %build
|
---|
70 |
|
---|
71 | %install
|
---|
72 | # le sigh. rpm's makeinstall macro includes the buildroot in the dirs, so it will break here. :/
|
---|
73 | make \
|
---|
74 | prefix=%{_prefix} \
|
---|
75 | exec_prefix=%{_exec_prefix} \
|
---|
76 | bindir=%{_bindir} \
|
---|
77 | sbindir=%{_sbindir} \
|
---|
78 | sysconfdir=%{_sysconfdir} \
|
---|
79 | datadir=%{_datadir} \
|
---|
80 | includedir=%{_includedir} \
|
---|
81 | libdir=%{_libdir} \
|
---|
82 | libexecdir=%{_libexecdir} \
|
---|
83 | localstatedir=%{_localstatedir} \
|
---|
84 | sharedstatedir=%{_sharedstatedir} \
|
---|
85 | mandir=%{_mandir} \
|
---|
86 | infodir=%{_infodir} \
|
---|
87 | install DESTDIR=$RPM_BUILD_ROOT PARA_VERSIONS=%{?para_versions:1}%{?!para_versions:0}
|
---|
88 |
|
---|
89 | %clean
|
---|
90 | if [ "$RPM_BUILD_ROOT" != "/" ]; then
|
---|
91 | rm -rf $RPM_BUILD_ROOT
|
---|
92 | fi
|
---|
93 |
|
---|
94 | %files
|
---|
95 | %{_datadir}/%{pkg_leaf}
|
---|
96 | %attr(-,-,0755) %{_datadir}/%{pkg_leaf}/*.cgi
|
---|
97 | %attr(-,-,0755) %{_datadir}/%{pkg_leaf}/*.pl
|
---|
98 | %{_sysconfdir}/%{cfg_leaf}
|
---|
99 | %config %{_sysconfdir}/%{cfg_leaf}/dnsdb.conf
|
---|
100 |
|
---|
101 | %changelog
|
---|
102 | * Fri Jan 13 2012 Kris Deugau <kdeugau@deepnet.cx> 1.0-1
|
---|
103 | - Initial package
|
---|