Created
January 31, 2014 20:43
-
-
Save bracki/8742743 to your computer and use it in GitHub Desktop.
Generic Makefile for PECL debian packages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TOP := $(CURDIR) | |
PKGDIR = $(TOP)/pkg | |
all: build | |
$(PKGDIR): | |
mkdir -p $(PKGDIR) | |
clean: | |
rm -rf $(PKGDIR) | |
build: $(PKGDIR) | |
cd $(PKGDIR); \ | |
dh-make-pecl $(if $(DEPS),--depends $(DEPS)) $(if $(BUILD_DEPS),--build-depends $(BUILD_DEPS)) $(NAME)-$(VERSION) | |
cd $(PKGDIR)/php-$(NAME)-$(VERSION); \ | |
dch -l ".foo" "Foo build"; \ | |
cd $(PKGDIR)/php-$(NAME)-$(VERSION); \ | |
[ ! -f $(TOP)/$(NAME).patch ] || patch -p0 -i $(TOP)/$(NAME).patch | |
cd $(PKGDIR); \ | |
dpkg-source -b php-$(NAME)-$(VERSION); \ | |
sudo mk-build-deps -i *.dsc -t "apt-get -y --no-install-recommends"; \ | |
sudo rm *build-deps*; | |
cd $(PKGDIR)/php-$(NAME)-$(VERSION); \ | |
dpkg-buildpackage -rfakeroot -tc; | |
.PHONY: clean all build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment