X-Git-Url: https://git.sven.stormbind.net/?p=sven%2Fmysqltcl.git;a=blobdiff_plain;f=debian%2Frules;h=723bf5212a509546c09b2be54d10efa73de96089;hp=439bc930e95ddbfbcec6e4e589828f63709cf525;hb=720176e8674fb8fdbd995f665720a6dce86d7798;hpb=26273e4a12a913968a740de1aae4e1917c954465 diff --git a/debian/rules b/debian/rules index 439bc93..723bf52 100755 --- a/debian/rules +++ b/debian/rules @@ -5,21 +5,47 @@ include /usr/share/quilt/quilt.make + +ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) + CONFIGURE_OPTIONS += --build $(DEB_HOST_GNU_TYPE) +else + CONFIGURE_OPTIONS += --build $(DEB_BUILD_GNU_TYPE) \ + --host $(DEB_HOST_GNU_TYPE) +endif + + +CONFIGURE_OPTIONS += \ + --prefix=/usr \ + --enable-threads \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --with-tcl=/usr/lib \ + --with-tclinclude=/usr/include/tcl \ + + LDFLAGS += -Wl,-z,defs -Wl,--as-needed +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + + configure: patch configure-stamp configure-stamp: dh_testdir - ./configure \ - --prefix=/usr - --enable-threads + + CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \ + ./configure $(CONFIGURE_OPTIONS) touch configure-stamp build: configure build-stamp build-stamp: dh_testdir - $(MAKE) touch build-stamp @@ -28,7 +54,6 @@ cleaner: dh_testdir dh_testroot rm -f build-stamp configure-stamp - [ ! -f Makefile ] || $(MAKE) distclean dh_clean @@ -38,7 +63,14 @@ install: build dh_clean -k dh_installdirs - $(MAKE) install DESTDIR=$(CURDIR)/debian/mysqltcl/ + $(MAKE) install DESTDIR=$(CURDIR)/debian/mysqltcl + mkdir $(CURDIR)/debian/mysqltcl/usr/lib/tcltk + mv $(CURDIR)/debian/mysqltcl/usr/lib/mysqltcl* \ + $(CURDIR)/debian/mysqltcl/usr/lib/tcltk + rm -rf \ + $(CURDIR)/debian/mysqltcl/usr/share/man/mann \ + $(CURDIR)/debian/mysqltcl/usr/bin \ + $(CURDIR)/debian/mysqltcl/usr/include # Build architecture-independent files here. @@ -50,7 +82,6 @@ binary-arch: build install dh_testdir dh_testroot dh_installdocs - dh_installexamples dh_installman dh_installchangelogs ChangeLog dh_link