Created
January 3, 2011 11:11
-
-
Save jordansissel/763362 to your computer and use it in GitHub Desktop.
Building .debs without debian policy/code infections
This file contains 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
DEBDIR=deb-build | |
create-package-deb: pre-create-package VERSION xdo_version.h | |
[ -d $(DEBDIR) ] && rm -r $(DEBDIR) | |
$(MAKE) install DESTDIR=$(DEBDIR) PREFIX=/usr INSTALLMAN=/usr/share/man | |
$(MAKE) create-package-deb-xdotool | |
# Package 'xdotool*.deb' | |
create-package-deb-xdotool: $(DEBDIR)/usr $(DEBDIR)/xdotool | |
$(MAKE) $(DEBDIR)/xdotool/data.tar.gz $(DEBDIR)/xdotool/control.tar.gz \ | |
$(DEBDIR)/xdotool/debian-binary | |
cd $(DEBDIR)/xdotool; \ | |
ar -qc xdotool_$(VERSION)-1_$(shell uname -m).deb \ | |
debian-binary \ | |
data.tar.gz \ | |
control.tar.gz | |
$(DEBDIR)/xdotool: | |
mkdir -p $@ | |
$(DEBDIR)/xdotool/debian-binary: | |
echo "2.0" > $(DEBDIR)/xdotool/debian-binary | |
$(DEBDIR)/xdotool/data.tar.gz: $(DEBDIR)/xdotool | |
tar -C $(DEBDIR) -zcf $(DEBDIR)/xdotool/data.tar.gz usr/bin/xdotool | |
$(DEBDIR)/xdotool/control: $(DEBDIR)/xdotool | |
sed -e 's/%VERSION%/$(VERSION)/g; s/%MAJOR%/$(MAJOR)/' ext/debian/xdotool.control > $@ | |
$(DEBDIR)/xdotool/md5sums: $(DEBDIR)/xdotool $(DEBDIR)/xdotool/data.tar.gz | |
tar -ztf $(DEBDIR)/xdotool/data.tar.gz | (cd $(DEBDIR); xargs md5sum) > $@ | |
$(DEBDIR)/xdotool/control.tar.gz: $(DEBDIR)/xdotool/control $(DEBDIR)/xdotool/md5sums | |
tar -C $(DEBDIR)/xdotool -zcf $(DEBDIR)/xdotool/control.tar.gz control md5sums |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment