Hi, I'm currently in the process of creating gentoo packages for softhsm and opendnssec. Because gentoo builds from source on the users machine, I'm trying to iron out some issues during configure/make/make install steps.
Gentoo uses flags that typically adapt the install by setting configure flags, but because of scripted automation, both the --enable-foo and --disable-foo switches should work. This gave me some issues to solve, f.i. --enable-auditor does *not* build the auditor :) Also (config) file installation does not respect ${DESTDIR}. It tests for existence of dirs and files in /, and then tries to install into $DESTDIR. This gives unreliable results (and even does not succeed with $DESTDIR pointing to an empty directory currently). Patches: - softhsm-1.1.3-m4.patch: respect --disable-64bit - softhsm-1.1.3-Makefile.am.patch: respect $DESTDIR for config files - opendnssec-1.0.0_rc4-Makefile.am.patch: respect $DESTDIR for config files - opendnssec-1.0.0_rc4-configure.ac.patch: respect --enable-auditor NB Unlike the names suggest, all patches are against svn trunk. -- Regards, Tom
Index: m4/acx_64bit.m4 =================================================================== --- m4/acx_64bit.m4 (revision 2796) +++ m4/acx_64bit.m4 (working copy) @@ -4,7 +4,7 @@ AC_ARG_ENABLE( [64bit], [AS_HELP_STRING([--enable-64bit],[enable 64-bit compiling])], - [enable_64bit="yes"], + [enable_64bit="${enableval}"], [enable_64bit="no"]) if test "x$enable_64bit" = "xyes"
Index: Makefile.am =================================================================== --- Makefile.am (revision 2796) +++ Makefile.am (working copy) @@ -18,10 +18,10 @@ EXTRA_DIST = $(srcdir)/m4/*.m4 $(srcdir)/softhsm.conf.5.in install-data-hook: - test -d ${sysconfdir} || \ + test -d ${DESTDIR}${sysconfdir} || \ ${INSTALL} -d ${DESTDIR}${sysconfdir} - test -f ${sysconfdir}/softhsm.conf || \ + test -f ${DESTDIR}${sysconfdir}/softhsm.conf || \ ${INSTALL_DATA} ${top_builddir}/softhsm.conf ${DESTDIR}${sysconfdir} ${INSTALL_DATA} ${top_builddir}/softhsm.conf ${DESTDIR}${sysconfdir}/softhsm.conf.sample - test -d ${softhsmdbdir} || \ + test -d ${DESTDIR}${softhsmdbdir} || \ ${INSTALL} -d -m 700 ${DESTDIR}${softhsmdbdir}
# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=2 inherit autotools eutils multilib MY_P=${P/_rc/rc} DESCRIPTION="An open-source turn-key solution for DNSSEC" HOMEPAGE="http://www.opendnssec.org/" SRC_URI="http://www.opendnssec.org/files/source/${MY_P}.tar.gz" LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="auditor softhsm opensc" DEPEND=">=net-libs/ldns-1.6.4 >=dev-libs/libxml2-2.6.16 >=dev-lang/ruby-1.8.7_p249[ssl] >=dev-ruby/dnsruby-1.4.3 >=dev-python/4suite-1.0.2-r1 >=dev-db/sqlite-3.3.9 softhsm? ( >=dev-libs/softhsm-1.1.3 ) opensc? ( >=dev-libs/opensc-0.11.12 )" RDEPEND="${DEPEND}" S="${WORKDIR}/${MY_P}" pkg_setup() { enewgroup opendnssec enewuser opendnssec -1 -1 -1 opendnssec } src_prepare() { epatch "${FILESDIR}"/"${P}"-Makefile.am.patch || die "epatch failed" epatch "${FILESDIR}"/"${P}"-configure.ac.patch || die "epatch failed" eautoreconf } src_configure() { local myconf="" use softhsm && myconf="$myconf --with-pkcs11-softhsm=/usr/$(get_libdir)/libsofthsm.so" use opensc && myconf="$myconf --with-pkcs11-opensc=/usr/$(get_libdir)/opensc-pkcs11.so" econf $myconf \ $(use_enable auditor) } src_install() { emake DESTDIR="${D}" install || die "emake install failed" dodoc KNOWN_ISSUES NEWS README || die "dodoc failed" rm "${D}"/usr/share/opendnssec.spec || die "failed to remove spec file" }
Index: configure.ac =================================================================== --- configure.ac (revision 2796) +++ configure.ac (working copy) @@ -36,10 +36,9 @@ AC_ARG_ENABLE(auditor, AC_HELP_STRING([--disable-auditor], [Disable auditor build (default enabled)]), - [],[]) -if test "${enable_auditor+set}" != set; then - enable_auditor=yes -fi + [enable_auditor="${enableval}"], + [enable_auditor="yes"]) + if test "${enable_auditor}" = yes; then AM_PROG_RUBY AC_CONFIG_SUBDIRS([ auditor ])
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Opendnssec-user mailing list Opendnssec-user@lists.opendnssec.org https://lists.opendnssec.org/mailman/listinfo/opendnssec-user