From: Jelte Jansen Date: Thu, 6 Oct 2005 09:43:49 +0000 (+0000) Subject: added .spec for building rpms (thanks to Paul Wouters) X-Git-Tag: release-1.0.0~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6da06d47b49a73449218210c207e9155e4a53997;p=thirdparty%2Fldns.git added .spec for building rpms (thanks to Paul Wouters) added DESTDIR to makefile targets --- diff --git a/Changelog b/Changelog index 5b9f46fd..ef433bc4 100644 --- a/Changelog +++ b/Changelog @@ -9,6 +9,8 @@ XX Sep 2005: 0.80: ldns-team * [tools] Drill was added to ldns - see drill/ * [tools] experimental signer was added * [building] better check for ssl + * [building] major revision of build system + * [building] added rpm .spec in packaging/ (thanks to Paul Wouters) 28 Jul 2005: 0.70: ldns-team * [func] ldns_pkt_get_section now returns copies from the rrlists diff --git a/Makefile.in b/Makefile.in index 4a1a7422..51f0b6ff 100644 --- a/Makefile.in +++ b/Makefile.in @@ -156,40 +156,40 @@ uninstall: uninstall-doc uninstall-h uninstall-lib destclean: uninstall install-doc: doc - ${INSTALL} -d $(mandir)/man3 - cp -Rp doc/man/man3/* $(mandir)/man3/ - ${INSTALL} -d $(mandir)/man1 + ${INSTALL} -d $(DESTDIR)$(mandir)/man3 + cp -Rp doc/man/man3/* $(DESTDIR)$(mandir)/man3/ + ${INSTALL} -d $(DESTDIR)$(mandir)/man1 for i in $(PROG_TARGETS); do \ - ${INSTALL} -c -m 644 $(srcdir)/doc/$$i.1 $(mandir)/man1 ; done + ${INSTALL} -c -m 644 $(srcdir)/doc/$$i.1 $(DESTDIR)$(mandir)/man1 ; done exit 0 uninstall-doc: doc for i in `cat doc/ldns_manpages`; do \ - rm -f $(mandir)/man3/$$i.3 ; done + rm -f $(DESTDIR)$(mandir)/man3/$$i.3 ; done for i in $(PROG_TARGETS); do \ - rm -f $(mandir)/man1/$$i.1 ; done + rm -f $(DESTDIR)$(mandir)/man1/$$i.1 ; done exit 0 - rmdir -p --ignore-fail-on-non-empty $(mandir)/man3 + rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(mandir)/man3 install-h: lib - $(INSTALL) -m 755 -d $(includedir)/ldns + $(INSTALL) -m 755 -d $(DESTDIR)$(includedir)/ldns for i in $(LIBDNS_HEADERS); do \ - MVPROG=/bin/cp $(INSTALL) -m 644 $$i $(includedir)/ldns/; done + MVPROG=/bin/cp $(INSTALL) -m 644 $$i $(DESTDIR)$(includedir)/ldns/; done uninstall-h: for i in $(LIBDNS_HEADERS); do \ - rm -f $(includedir)/$$i; done - [ ! -d $(includedir)/ldns ] || rmdir -p --ignore-fail-on-non-empty $(includedir)/ldns + rm -f $(DESTDIR)$(includedir)/$$i; done + [ ! -d $(DESTDIR)$(includedir)/ldns ] || rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(includedir)/ldns exit 0 install-lib: lib - $(INSTALL) -m 755 -d $(libdir) - $(LIBTOOL) --mode=install cp libldns.la $(libdir) - $(LIBTOOL) --mode=finish $(libdir) + $(INSTALL) -m 755 -d $(DESTDIR)$(libdir) + $(LIBTOOL) --mode=install cp libldns.la $(DESTDIR)$(libdir) + $(LIBTOOL) --mode=finish $(DESTDIR)$(libdir) uninstall-lib: - $(LIBTOOL) --mode=uninstall rm -f $(libdir)/libldns.la - rmdir -p --ignore-fail-on-non-empty $(libdir) + $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/libldns.la + rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(libdir) snapshot: distclean (rm -rf ../ldns-snap-$(DATE)/) diff --git a/README b/README index 942b1c6e..50d5010f 100644 --- a/README +++ b/README @@ -75,4 +75,6 @@ consists out of: We have received patches from the following people, thanks! o HÃ¥kan Olsson o Jakob Schlyter + o Paul Wouters + diff --git a/configure.ac b/configure.ac index d2526065..9c1b2add 100644 --- a/configure.ac +++ b/configure.ac @@ -18,6 +18,7 @@ AC_PROG_MAKE_SET # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_INLINE +AC_LANG_C AC_DEFUN([AC_CHECK_FORMAT_ATTRIBUTE], [AC_REQUIRE([AC_PROG_CC]) diff --git a/examples/Makefile.in b/examples/Makefile.in index 70f30807..abb1907c 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -75,17 +75,17 @@ confclean: clean rm -rf config.log config.status config.h Makefile install: $(PROGRAMS) - $(INSTALL) -d -m 755 $(bindir) + $(INSTALL) -d -m 755 $(DESTDIR)$(bindir) for i in $(PROGRAMS); do \ - ${INSTALL} -c $$i $(bindir) ; done + ${INSTALL} -c $$i $(DESTDIR)$(bindir) ; done exit 0 uninstall: for i in $(PROGRAMS); do \ - rm -f $(bindir)/$$i ; done + rm -f $(DESTDIR)$(bindir)/$$i ; done exit 0 - rmdir --ignore-fail-on-non-empty -p $(bindir) + rmdir --ignore-fail-on-non-empty -p $(DESTDIR)$(bindir) diff --git a/packaging/fedora/ldns.spec b/packaging/fedora/ldns.spec new file mode 100644 index 00000000..154a12e7 --- /dev/null +++ b/packaging/fedora/ldns.spec @@ -0,0 +1,90 @@ +Summary: Lowlevel DNS(SEC) library with API +Name: ldns +Version: 1.0.0 +Release: 2 +License: LGPL +Url: http://open.nlnetlabs.nl/%{name}/ +Source: http://open.nlnetlabs.nl/downloads/%{name}-%{version}.tar.gz +Group: System Environment/Libraries +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Requires: openssl +BuildRequires: libtool, autoconf, automake, gcc-c++, openssl-devel, doxygen + +%description +ldns is a library with the aim to simplify DNS programing in C. All +lowlevel DNS/DNSSEC operations are supported. We also define a higher +level API which allows a programmer to (for instance) create or sign +packets. + +%package devel +Summary: Development package that includes the ldns header files +Group: Development/Libraries +Requires: %{name} = %{version}-%{release}, openssl-devel + +%description devel +The devel package contains the ldns library and the include files + +%prep +rm -rf %{buildroot} +%setup -q +libtoolize +autoreconf +./configure + +#this is really a bad hack, and should be fixed in the 'make install' target +#./configure --prefix=%{buildroot}%{_prefix} --libdir=%{buildroot}%{_libdir} --includedir=%{buildroot}%{_includedir} --mandir=%{buildroot}%{_mandir} + +%build +%{__make} %{?_smp_mflags} +%{__make} %{?_smp_mflags} drill +#%{__make} %{?_smp_mflags} examples +%{__make} %{?_smp_mflags} doc + +%install + +#install -d 0755 %{buildroot}%{_includedir}/ldns +#install -d 0755 %{buildroot}%{_libdir} +#install -d 0755 %{buildroot}%{_mandir}/man3 +%{__make} install +%{__make} install-doc +%{__make} drill-install +#%{__make} examples +#remove doc stubs +rm -rf doc/.svn +#remove double set of man pages +rm -rf doc/man + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%{_libdir}/libldns*so +%doc README LICENSE ROADMAP TODO +%doc %{_mandir}/*/* + +%files devel +%defattr(-,root,root,-) +%{_libdir}/libldns.la +%{_libdir}/libldns.a +%dir %{_includedir}/ldns/* +%doc doc +%doc Changelog COMPILE + +%pre + +%post +/sbin/ldconfig + +%postun +/sbin/ldconfig + +%changelog +* Wed Oct 5 2005 Paul Wouters 0.70_1205 +- reworked for svn version + +* Sun Sep 25 2005 Paul Wouters - 0.70 +- Initial version + + +