2013-01-27 07:08:27 +00:00
|
|
|
BASEDIR := ../../../
|
|
|
|
PREFIX := /usr
|
|
|
|
HEADER := $(BASEDIR)/gmqcc.h
|
2013-01-27 09:31:27 +00:00
|
|
|
MAJOR := $(shell sed -n -e '/GMQCC_VERSION_MAJOR/{s/.* .* //;p;q;}' $(HEADER))
|
|
|
|
MINOR := $(shell sed -n -e '/GMQCC_VERSION_MINOR/{s/.* .* //;p;q;}' $(HEADER))
|
|
|
|
PATCH := $(shell sed -n -e '/GMQCC_VERSION_PATCH/{s/.* .* //;p;q;}' $(HEADER))
|
|
|
|
PKGREL := 1
|
2014-04-05 09:16:15 +00:00
|
|
|
SUFFIX ?= archlinux
|
2013-01-27 09:31:27 +00:00
|
|
|
CARCH := $(shell uname -m)
|
2014-04-05 09:16:15 +00:00
|
|
|
PKGDIR := gmqcc-$(MAJOR).$(MINOR).$(PATCH)-$(PKGREL)-$(CARCH)-$(SUFFIX)
|
2013-10-11 09:17:03 +00:00
|
|
|
TARCOMP := -J
|
2013-01-27 09:31:27 +00:00
|
|
|
PKG := $(PKGDIR).pkg.tar.xz
|
2013-01-27 07:08:27 +00:00
|
|
|
PKGINFO := $(PKGDIR)/.PKGINFO
|
2013-09-09 10:18:30 +00:00
|
|
|
DESTDIR := distro/archlinux/this
|
2013-03-21 02:02:41 +00:00
|
|
|
CFLAGS :=
|
2013-01-27 07:08:27 +00:00
|
|
|
|
2013-09-09 10:18:30 +00:00
|
|
|
LIBC_DEPEND := glibc
|
2013-03-21 02:02:41 +00:00
|
|
|
|
|
|
|
base:
|
|
|
|
$(MAKE) -C $(BASEDIR) clean
|
2013-04-26 15:56:08 +00:00
|
|
|
CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
|
2013-10-11 13:51:08 +00:00
|
|
|
$(MAKE) -C $(BASEDIR) "DESTDIR=$(DESTDIR)/$(PKGDIR)" "PREFIX=$(PREFIX)" strip install
|
2013-01-27 07:08:27 +00:00
|
|
|
@echo "pkgname = gmqcc" > $(PKGINFO)
|
2013-01-27 09:31:27 +00:00
|
|
|
@echo "pkgver = $(MAJOR).$(MINOR).$(PATCH)-$(PKGREL)" >> $(PKGINFO)
|
2013-01-27 07:08:27 +00:00
|
|
|
@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)
|
2013-01-27 09:31:27 +00:00
|
|
|
@echo "size = `du -sk $(PKGDIR) | awk '{print $$1 * 1024}'`" >> $(PKGINFO)
|
|
|
|
@echo "arch = $(CARCH)" >> $(PKGINFO)
|
2013-01-27 07:08:27 +00:00
|
|
|
@echo "license = MIT" >> $(PKGINFO)
|
|
|
|
@echo "conflict = gmqcc" >> $(PKGINFO)
|
2013-09-09 10:18:30 +00:00
|
|
|
@echo "depend = $(LIBC_DEPEND)" >> $(PKGINFO)
|
2013-01-27 07:08:27 +00:00
|
|
|
@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)
|
2013-10-11 09:14:46 +00:00
|
|
|
@bsdtar -C $(PKGDIR) -czf $(PKGDIR)/.MTREE \
|
2013-09-09 10:08:57 +00:00
|
|
|
--format=mtree \
|
|
|
|
--options='!all,use-set,type,uid,gid,mode,time,size,md5,sha256,link' \
|
2014-04-05 09:16:15 +00:00
|
|
|
.PKGINFO usr/ 2>&1 >/dev/null
|
|
|
|
@bsdtar $(TARCOMP) -cvf $(PKG) -C $(PKGDIR)/ .PKGINFO .MTREE usr/ 2>&1 >/dev/null
|
2013-01-27 07:26:50 +00:00
|
|
|
@rm -rf $(PKGDIR)
|
2013-01-27 07:08:27 +00:00
|
|
|
|
|
|
|
clean:
|
2013-03-21 02:02:41 +00:00
|
|
|
$(MAKE) -C $(BASEDIR) clean
|
|
|
|
@rm -f *.pkg.tar.xz
|
2013-01-27 07:08:27 +00:00
|
|
|
|
|
|
|
all: base
|