source: trunk/dnsadmin.spec@ 311

Last change on this file since 311 was 262, checked in by Kris Deugau, 13 years ago

/trunk

GPL-tag and normalize headers on scripts and module.
Clean up/correct SVN properties for consistency

  • Property svn:keywords set to Date Rev Author Id
File size: 2.7 KB
Line 
1# spec file for DNS Administrator
2# $Id: dnsadmin.spec 262 2012-03-04 22:53:54Z 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
41Summary: DeepNet DNS Administrator
42Name: dnsadmin
43Version: #VERSION#
44Release: %{release}
45Group: Applications/System
46Source: %{name}-%{version}.tar.gz
47Packager: Kris Deugau <kdeugau@deepnet.cx>
48BuildRoot: /var/tmp/%{name}-%{version}
49License: GPL 3+
50BuildArch: noarch
51
52# not absolutely required:
53Requires: 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*
59Requires: libfrontier-rpc-perl >= 0.07b4, perl(CGI::Simple), perl(HTML::Template), perl(Net::DNS)
60Requires: perl(CGI::Session), perl(Crypt::PasswdMD5), perl(Digest::MD5), perl(Net::Whois::Raw)
61%endif
62
63%description
64A 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. :/
73make \
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
90if [ "$RPM_BUILD_ROOT" != "/" ]; then
91 rm -rf $RPM_BUILD_ROOT
92fi
93
94%files
95%dir %{_datadir}/%{pkg_leaf}
96%attr(-,-,0755) %{_datadir}/%{pkg_leaf}/*.cgi
97%attr(-,-,0755) %{_datadir}/%{pkg_leaf}/*.pl
98%{_datadir}/%{pkg_leaf}/DNSDB.pm
99%{_datadir}/%{pkg_leaf}/images
100%{_datadir}/%{pkg_leaf}/templates
101%dir %{_sysconfdir}/%{cfg_leaf}
102%config %{_sysconfdir}/%{cfg_leaf}/dnsdb.conf
103
104%changelog
105* Fri Jan 13 2012 Kris Deugau <kdeugau@deepnet.cx> 1.0-1
106- Initial package
Note: See TracBrowser for help on using the repository browser.