From 8d3591e114f96bb5b2406dc6d76b2dbf789d2f95 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Sat, 10 Apr 2010 23:41:09 +0200 Subject: * Add a dh buildsystem; thanks to Mike Hommey for the patch (Closes: #576946). - add src/xul-ext_build.pm - update src/Makefile --- src/Makefile | 4 ++-- src/xul-ext_build.pm | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 src/xul-ext_build.pm (limited to 'src') diff --git a/src/Makefile b/src/Makefile index 593e620..b89a80a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -99,8 +99,8 @@ install: $(subst_files) $(extra_files) $(foreach dir,$(extra_dirs),$(wildcard $( find $(DESTDIR)$(DATADIR) -type f \( -name \*.pl -o -name \*.sh \) -exec chmod -v 755 {} \; chmod 755 $(DESTDIR)$(DATADIR)/minefield-packager.mk install -m 644 xul-app-data.csv.$(VENDOR) $(DESTDIR)$(DATADIR)/xul-app-data.csv - mkdir -p $(DESTDIR)/usr/share/perl5/Debian/Debhelper/Sequence - install -m 644 xul-ext.pm $(DESTDIR)/usr/share/perl5/Debian/Debhelper/Sequence/xul_ext.pm + install -D -m 644 xul-ext.pm $(DESTDIR)/usr/share/perl5/Debian/Debhelper/Sequence/xul_ext.pm + install -D -m 644 xul-ext_build.pm $(DESTDIR)/usr/share/perl5/Debian/Debhelper/Buildsystem/xul_ext.pm clean: rm -f $(subst_files) diff --git a/src/xul-ext_build.pm b/src/xul-ext_build.pm new file mode 100644 index 0000000..89c8763 --- /dev/null +++ b/src/xul-ext_build.pm @@ -0,0 +1,43 @@ +# A debhelper build system class for handling XUL extensions. +# +# Copyright: © 2010 Mike Hommey +# License: GPL-2+ + +package Debian::Debhelper::Buildsystem::xul_ext; + +use strict; +use base 'Debian::Debhelper::Buildsystem'; +use Debian::Debhelper::Dh_Lib; + +sub DESCRIPTION { + "XUL Extensions" +} + +sub check_auto_buildable { + my $this=shift; + return (-e $this->get_sourcepath("install.rdf")) ? 1 : 0; +} + +sub new { + my $class=shift; + my $this=$class->SUPER::new(@_); + $this->enforce_in_source_building(); + return $this; +} + +sub build { + my $this=shift; + $this->doit_in_sourcedir("xpi-pack", ".", $dh{FIRSTPACKAGE} . ".xpi"); +} + +sub install { + my $this=shift; + $this->doit_in_sourcedir("install-xpi", $dh{FIRSTPACKAGE} . ".xpi"); +} + +sub clean { + my $this=shift; + $this->doit_in_sourcedir("rm", "-f", $dh{FIRSTPACKAGE} . ".xpi"); +} + +1 -- cgit v1.2.3