diff options
author | Benjamin Drung <bdrung@ubuntu.com> | 2010-04-10 23:41:09 +0200 |
---|---|---|
committer | Benjamin Drung <bdrung@ubuntu.com> | 2010-04-10 23:41:09 +0200 |
commit | 8d3591e114f96bb5b2406dc6d76b2dbf789d2f95 (patch) | |
tree | 14eef704079279756ef372a707f202be772e01ad /src | |
parent | 8c5dbd07158193e9ff686007bf5ccc0eb4d130d9 (diff) |
* Add a dh buildsystem; thanks to Mike Hommey for the patch (Closes: #576946).
- add src/xul-ext_build.pm
- update src/Makefile
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 4 | ||||
-rw-r--r-- | src/xul-ext_build.pm | 43 |
2 files changed, 45 insertions, 2 deletions
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 |