Skip to content

Instantly share code, notes, and snippets.

@jordansissel
Created November 19, 2010 22:58
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jordansissel/707364 to your computer and use it in GitHub Desktop.
Save jordansissel/707364 to your computer and use it in GitHub Desktop.
activemq .deb building
VERSION=5.4.1
DOWNLOAD=http://apache.cs.utah.edu/activemq/apache-activemq/$(VERSION)/apache-activemq-$(VERSION)-bin.tar.gz
NAME=apache-activemq
TARBALL=$(NAME)-$(VERSION)-bin.tar.gz
BUILDDEPS=
RUNDEPS=java-runtime
#CFLAGS=-g
.PHONY: default
default: package
.PHONY: clean
clean:
rm $(NAME)-* $(NAME)_* || true
rm -r $(NAME)-$(VERSION) || true
$(TARBALL):
wget "$(DOWNLOAD)"
$(NAME)-$(VERSION): $(TARBALL)
tar -zxf $(TARBALL)
.PHONY: package
package: $(NAME)-$(VERSION)
cd $(NAME)-$(VERSION); \
set -e; \
rm -rf debian; \
dh_make -s -n -c gpl3 -e $$USER -p "$(NAME)_$(VERSION)" < /dev/null; \
sed -i -e "s/Build-Depends:.*/&, $(BUILDDEPS)/" debian/control; \
sed -i -e "s/Depends:.*/&, $(RUNDEPS)/" debian/control; \
[ -f ../rules ] && install ../rules debian/rules; \
install ../Makefile.activemq Makefile; \
CFLAGS=$(CFLAGS) debuild -uc -us
PREFIX=/opt/activemq
build:
echo "Nothing to to; binary package"
install:
install -d $(DESTDIR)$(PREFIX)
rsync -rtv --exclude linux-x86-32 . $(DESTDIR)$(PREFIX)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment