source: trunk/ipdb.spec@ 427

Last change on this file since 427 was 417, checked in by Kris Deugau, 14 years ago

/trunk

Rearrangements and tweaks toward releaseability:

  • Add Makefile to install halfway-sanely
  • Add .spec file
  • Shuffle "use IPDB;" and "use MyIPDB;" lines so that we can automagically insert a suitable "use lib..." line during 'make install'
  • Check copyright statements
  • Clear up some defaults, and place a number of "constants" in IPDB/MyIPDB rather than having them hardcoded all over the place (Still need to think of a sane way to do this for ipdb.psql's alloctype preseeding)
  • Tweak $VERSION identifier in IPDB.pm so it can be defined in the Makefile
  • Clean up some dangling bits from repository history conversion, remove unneeded "use ..." statements
  • Tweak rWHOIS export script to use more globals and "constants" from (My)IPDB.pm, and more Perl internals than system()-equivalents. Add a few fixme comments for longer-term flexibility improvements.
  • Property svn:keywords set to Id
File size: 1.8 KB
RevLine 
[417]1# spec file for IPDB
2# $Id: ipdb.spec 417 2010-06-30 21:48:03Z 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
31Summary: IP Database
32Name: ipdb
33Version: #VERSION#
34Release: %{release}
35Group: Applications/System
36Source: ipdb-#VERSION#.tar.gz
37Packager: Kris Deugau <kdeugau@deepnet.cx>
38BuildRoot: /var/tmp/%{name}-%{version}
39License: GPL 2+
40BuildArch: noarch
41
42%description
43A web-based IP address allocation management tool
44
45%prep
46%setup
47
48%build
49
50%install
51# le sigh. rpm's makeinstall macro includes the buildroot in the dirs, so it will break here. :/
52make \
53 prefix=%{_prefix} \
54 exec_prefix=%{_exec_prefix} \
55 bindir=%{_bindir} \
56 sbindir=%{_sbindir} \
57 sysconfdir=%{_sysconfdir} \
58 datadir=%{_datadir} \
59 includedir=%{_includedir} \
60 libdir=%{_libdir} \
61 libexecdir=%{_libexecdir} \
62 localstatedir=%{_localstatedir} \
63 sharedstatedir=%{_sharedstatedir} \
64 mandir=%{_mandir} \
65 infodir=%{_infodir} \
66 install DESTDIR=$RPM_BUILD_ROOT
67
68%clean
69if [ "$RPM_BUILD_ROOT" != "/" ]; then
70 rm -rf $RPM_BUILD_ROOT
71fi
72
73%files
74%{_libdir}/ipdb
75%attr(-,-,0755) %{_libdir}/ipdb/cgi-bin/*.cgi
76%attr(-,-,0755) %{_libdir}/ipdb/cgi-bin/*.pl
77%attr(-,-,0755) %{_libdir}/ipdb/cgi-bin/extras/*.pl
78%config %{_sysconfdir}/ipdb/MyIPDB.pm
79%{_sysconfdir}/ipdb
80
81%changelog
82* Mon Jun 28 2010 Kris Deugau <kdeugau@deepnet.cx> 2.6-1
83- Initial package
Note: See TracBrowser for help on using the repository browser.