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

Re: Re: Module::Build and dh-make-perl



> good question.. maybe this solution still works? (I haven't tried it)
>
> http://use.perl.org/~IlyaM/journal/14564

I just tried that today, and it almost worked.  The only thing that
didn't work was the 'clean' target in debian/rules, which runs "./Build
distclean", and requires that "perl Build.PL" runs first.  So I added a
rule for the Build file, and made the others depend on it.

I've attached a patch for debian/rules (I eagerly await feedback on
this because I'm a packaging n00b).

Also, dh-make-perl already incorporates the patch that is mentioned on
that web page.

Any word on when/whether the "refactoring" of dh-make-perl will be done
and Module::Build support added to it?


--

C. Chad Wallace
The Lodging Company
http://skihills.com/
Public Key ID: 0x262208A0

--- debian/rules	(revision 990)
+++ debian/rules	(working copy)
@@ -28,24 +28,29 @@
         CFLAGS += -O2
 endif
 
+build-file: build-file-stamp
+build-file-stamp:
+	$(PERL) Build.PL installdirs=vendor
+
+	touch build-file-stamp
+
 build: build-stamp
-build-stamp:
+build-stamp: build-file
 	dh_testdir
 
 	# Add commands to compile the package here
-	$(PERL) Makefile.PL INSTALLDIRS=vendor
-	$(MAKE) OPTIMIZE="$(CFLAGS)"
+	OPTIMIZE="$(CFLAGS)" LD_RUN_PATH="" ./Build
 	
 	touch build-stamp
 
-clean:
+clean: build-file
 	dh_testdir
 	dh_testroot
 
 	# Add commands to clean up after the build process here
-	$(MAKE) distclean
+	./Build distclean
 	
-	dh_clean build-stamp install-stamp
+	dh_clean build-file-stamp build-stamp install-stamp
 
 install: install-stamp
 install-stamp: build-stamp
@@ -53,13 +58,10 @@
 	dh_testroot
 	dh_clean -k
 
-	$(MAKE) test
-	$(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
-	
-	# As this is a architecture independent package, we are not supposed to install
-	# stuff to /usr/lib. MakeMaker creates the dirs, we delete them from the deb:
-	rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/lib/perl5
+	./Build test
 
+	./Build install destdir=$(TMP)
+
 	touch install-stamp
 
 binary-arch:


Reply to: