adding pkgrel to arch/this, and getting rid of du's -b option since it won't work for ArchBSD

This commit is contained in:
Wolfgang Bumiller 2013-01-27 10:31:27 +01:00
parent 531fbaf28c
commit 3e1c10628c

View file

@ -1,23 +1,25 @@
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
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
CARCH := $(shell uname -m)
PKGDIR := gmqcc-$(MAJOR).$(MINOR).$(PATCH)-$(PKGREL)-$(CARCH)
PKG := $(PKGDIR).pkg.tar.xz
PKGINFO := $(PKGDIR)/.PKGINFO
base:
base: clean
$(MAKE) -C $(BASEDIR) DESTDIR=distro/arch/this/$(PKGDIR) PREFIX=$(PREFIX) CFLAGS+=-m64 install
@echo "pkgname = gmqcc" > $(PKGINFO)
@echo "pkgver = $(MAJOR).$(MINOR).$(PATCH)" >> $(PKGINFO)
@echo "pkgver = $(MAJOR).$(MINOR).$(PATCH)-$(PKGREL)" >> $(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 = `du -shb $(shell echo $(PKGDIR)) | awk \"{s+=\\$$1} END {print s}\"`" >> $(PKGINFO)
@echo "arch = x86_64" >> $(PKGINFO)
@echo "size = `du -sk $(PKGDIR) | awk '{print $$1 * 1024}'`" >> $(PKGINFO)
@echo "arch = $(CARCH)" >> $(PKGINFO)
@echo "license = MIT" >> $(PKGINFO)
@echo "conflict = gmqcc" >> $(PKGINFO)
@echo "depend = glibc" >> $(PKGINFO)