Working toward a working RPM procedure

git-svn-id: https://svn.alkaloid.net/gpl/ldap2dns/trunk@125 06cd67b6-e706-0410-b29e-9de616bca6e9
This commit is contained in:
Ben Klang
2005-12-05 03:19:12 +00:00
parent dcad728f39
commit 5a115dc34f
2 changed files with 46 additions and 22 deletions

View File

@@ -11,9 +11,7 @@ INSTALL_PREFIX=
PREFIXDIR=$(INSTALL_PREFIX)/usr PREFIXDIR=$(INSTALL_PREFIX)/usr
LDAPCONFDIR=$(INSTALL_PREFIX)/etc/openldap LDAPCONFDIR=$(INSTALL_PREFIX)/etc/openldap
SPECFILE=ldap2dns.spec SPECFILE=ldap2dns.spec
RPMSRCDIR=/usr/src/packages/SOURCES DISTRIBUTION=redhat
# For Red Hat use
# make RPMSRCDIR=/usr/src/redhat/SOURCES rpm
all: ldap2dns ldap2dnsd all: ldap2dns ldap2dnsd
@@ -52,13 +50,22 @@ tar: clean
mv ldap2dns-$(VERSION) ldap2dns; \ mv ldap2dns-$(VERSION) ldap2dns; \
cd ldap2dns cd ldap2dns
$(SPECFILE): Specfile rpm: tar
ifeq "$(DISTRIBUTION)" "redhat"
RPMBASE=/usr/src/redhat
RPMGROUP=Daemons/DNS
endif
ifeq "$(DISTRIBUTION)" "suse"
RPMBASE=/usr/src/packages
RPMGROUP=Productivity/Networking/DNS/Servers
endif
sed -e 's#%VERSION%#$(VERSION)#g' \ sed -e 's#%VERSION%#$(VERSION)#g' \
-e 's#%RELEASE%#$(RELEASE)#g' \ -e 's#%RELEASE%#$(RELEASE)#g' \
< $< > $@ -e 's#%RPMGROUP%#$(RPMGROUP)#g' \
< $(SPECFILE).in > $(SPECFILE)
rpm: tar $(SPECFILE)
mv ../ldap2dns-$(VERSION).tar.gz $(RPMSRCDIR) mv ../ldap2dns-$(VERSION).tar.gz $(RPMBASE)
rpmbuild -ba $(SPECFILE) rpmbuild -ba $(SPECFILE)

View File

@@ -1,12 +1,27 @@
Summary: LDAP to DNS gateway. #
Name: ldap2dns # spec file for package ldap2dns
Version: %VERSION% #
Release: %RELEASE% # Copyright (c) 2005 Ben Klang, Alkaloid Networks
Copyright: GPL # This file and all modifications and additions to the pristine
Group: Daemons/DNS # package are under the same license as the package itself.
Source: ldap2dns-%{version}.tar.gz #
BuildRoot: /var/tmp/%{name}-root # Please submit bugfixes or comments via http://projects.alkaloid.net
Requires: openldap-devel #
# norootforbuild
# neededforbuild openldap-devel
BuildRequires: openldap-devel
Summary: LDAP to DNS gateway
Packager: Ben Klang <ben@alkaloid.net>
Vendor: Alkaloid Networks
Name: ldap2dns
Version: %VERSION%
Release: %RELEASE%
License: GPL
Group: %RPMGROUP%
Source: ldap2dns-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
ldap2dns is a program to create DNS records directly from an LDAP database. It ldap2dns is a program to create DNS records directly from an LDAP database. It
@@ -17,8 +32,9 @@ administrator only has to access the LDAP database.
If he desires he can add access control for each zone, create a webbased GUI If he desires he can add access control for each zone, create a webbased GUI
and add all other kind of zone and resource record information without and add all other kind of zone and resource record information without
interfering with the DNS server. interfering with the DNS server.
ldap2dns is designed to write binary data.cdb files used by tinydns, but also
may be used to write .db-files used by named. ldap2dns is designed to write the text data files used by tinydns, but also
may be used to write zone files used by Bind.
%prep %prep
%setup %setup
@@ -38,7 +54,8 @@ make INSTALL_PREFIX=$RPM_BUILD_ROOT install
/usr/bin/ldap2dns /usr/bin/ldap2dns
/usr/bin/ldap2dnsd /usr/bin/ldap2dnsd
/usr/bin/ldap2tinydns-conf /usr/bin/ldap2tinydns-conf
%doc README.html %doc doc/README.html
%doc doc/example.ldif
%doc import.pl %doc import.pl
%config /etc/openldap/schema/ldap2dns.schema %config /etc/openldap/schema/ldap2dns.schema