Add this/Makefile for generating a .tar.xz for arch packages. This is sort of like...
authorDale Weiler <killfieldengine@gmail.com>
Sun, 27 Jan 2013 07:08:27 +0000 (07:08 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Sun, 27 Jan 2013 07:08:27 +0000 (07:08 +0000)
.gitignore
distro/arch/this/Makefile [new file with mode: 0644]

index 1a07cbe457c4b3ffb0b7ca28260615a2870660f0..6e7e99db297d8aee61595edbe00eb50fadd00092 100644 (file)
@@ -11,3 +11,4 @@ gmqcc
 distro/arch/*
 !distro/arch/git/PKGBUILD
 !distro/arch/release/PKGBUILD
+!distro/arch/this/Makefile
diff --git a/distro/arch/this/Makefile b/distro/arch/this/Makefile
new file mode 100644 (file)
index 0000000..db6dc6a
--- /dev/null
@@ -0,0 +1,40 @@
+BASEDIR := ../../../
+PREFIX  := /usr
+HEADER  := $(BASEDIR)/gmqcc.h
+MAJOR   := `sed -n -e '/GMQCC_VERSION_MAJOR/{s/.* .* //;p;q;}' $(HEADER)`
+MINOR   := `sed -n -e '/GMQCC_VERSION_MINOR/{s/.* .* //;p;q;}' $(HEADER)`
+PATCH   := `sed -n -e '/GMQCC_VERSION_PATCH/{s/.* .* //;p;q;}' $(HEADER)`
+PKGDIR  := gmqcc-$(MAJOR).$(MINOR).$(PATCH)
+PKG     := $(PKGDIR).tar.xz
+PKGINFO := $(PKGDIR)/.PKGINFO
+
+base:
+       $(MAKE) -C $(BASEDIR) DESTDIR=distro/arch/this/$(PKGDIR) PREFIX=$(PREFIX) install
+       @echo "pkgname = gmqcc" > $(PKGINFO)
+       @echo "pkgver = $(MAJOR).$(MINOR).$(PATCH)" >> $(PKGINFO)
+       @echo "pkgdesc = An Improved Quake C Compiler" >> $(PKGINFO)
+       @echo "url = https://github.com/graphitemaster/gmqcc.git" >> $(PKGINFO)
+       @echo "builddate = `date -u \"+%s\"`" >> $(PKGINFO)
+       @echo "packager = Unknown Packager" >> $(PKGINFO)
+       @echo "size = $(shell du -shb $(PKGDIR) | awk '{s+=$$1} END {print s}')" >> $(PKGINFO)
+       @echo "arch = x86_64" >> $(PKGINFO)
+       @echo "license = MIT" >> $(PKGINFO)
+       @echo "conflict = gmqcc" >> $(PKGINFO)
+       @echo "depend = glibc" >> $(PKGINFO)
+       @echo "provides = gmqcc= $(MAJOR).$(MINOR).$(PATCH)" >> $(PKGINFO)
+       @echo "makepkgopt = strip" >> $(PKGINFO)
+       @echo "makepkgopt = docs" >> $(PKGINFO)
+       @echo "makepkgopt = libtool" >> $(PKGINFO)
+       @echo "makepkgopt = emptydirs" >> $(PKGINFO)
+       @echo "makepkgopt = zipman" >> $(PKGINFO)
+       @echo "makepkgopt = purge" >> $(PKGINFO)
+       @echo "makepkgopt = !upx" >> $(PKGINFO)
+       @tar -cJvf $(PKG) -C $(PKGDIR)/ .PKGINFO usr/
+       @rm -rf $(PKGDIR)
+
+
+clean:
+       @rm -f  $(PKG)
+
+
+all: base