[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fix for building ntp 4.2.2



Hey Barry,

On Tue, 2007-04-10 at 17:27:10 -0400, Barry deFreese wrote:
> Here is what I did to build ntp 4.2.2.  Let me know what you think.

> @@ -1,5 +1,7 @@
> #!/usr/bin/make -f
> 
> +DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
> +
> include /usr/share/quilt/quilt.make
> 
> # hacks to avoid running these things during the build
> @@ -18,6 +20,16 @@
> config: patch config.status
> config.status: $(QUILT_STAMPFN)
>    dh_testdir
> +ifeq ($(DEB_HOST_ARCH_OS),hurd)
> +   ./configure CFLAGS='$(CFLAGS)' \
> +       --prefix=/usr \
> +       --enable-all-clocks --enable-parse-clocks --enable-SHM \
> +       --disable-debugging --sysconfdir=/var/lib/ntp \
> +       --with-sntp=no \
> +       --enable-linuxcaps \
> +       --enable-ipv6=no \
> +       --disable-dependency-tracking
> +else
>    ./configure CFLAGS='$(CFLAGS)' \
>        --prefix=/usr \
>        --enable-all-clocks --enable-parse-clocks --enable-SHM \
> @@ -25,6 +37,7 @@
>        --with-sntp=no \
>        --enable-linuxcaps \
>        --disable-dependency-tracking
> +endif
> 
> build: config build-stamp
> build-stamp: config.status

Given that the difference should be minimal it's better to set a
variable instead and use it on the configure argument line instead of
duping the whole thing, this way it will be easy to maintin (you can
check qemu for example on how to do something like that).

Also is that «--enable-linuxcaps» there right?

> @@ -55,9 +68,15 @@
>    $(MAKE) install DESTDIR=$(CURDIR)/debian/ntp
> 
>    # move the administrator programs from /usr/bin to /usr/sbin
> +ifeq ($(DEB_HOST_ARCH_OS),hurd)
> +   for file in ntpdate ntp-wait ntpd tickadj ntp-keygen; do \
> +       mv debian/ntp/usr/bin/$$file debian/ntp/usr/sbin/$$file || exit; \
> +   done
> +else
>    for file in ntpdate ntp-wait ntpd ntptime tickadj ntp-keygen; do \
>        mv debian/ntp/usr/bin/$$file debian/ntp/usr/sbin/$$file || exit; \
>    done
> +endif
> 
>    install -D -m 0755 debian/ntp.ifup debian/ntp/etc/network/if-up.d/ntp
>    install -D -m 0755 debian/ntpdate.ifup 
> debian/ntpdate/etc/network/if-up.d/ntpdate

The same here, you could use a varuable with the list instead, so no
code is duped.

regards,
guillem



Reply to: