Misc packages for Arch Linux
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.3 KiB

include .repoinfo
uname_M := $(shell uname -m || echo "not")
.PHONY: abs db sync test .force
$(REPO).abs.tar.gz: .force
git archive --prefix=$(REPO)/ -o $(REPO).abs.tar.gz HEAD
repo/%/$(REPO).abs.tar.gz: $(REPO).abs.tar.gz
cp $< $@
repo/%/$(REPO).db: .force
rm -f $(dir $@)/$(REPO).{db,files}*
( \
cd $(dir $@); \
find . -type f \( \
-name '*.pkg.tar' -or \
-name '*.pkg.tar.bz2' -or \
-name '*.pkg.tar.gz' -or \
-name '*.pkg.tar.lrz' -or \
-name '*.pkg.tar.lzo' -or \
-name '*.pkg.tar.lz4' -or \
-name '*.pkg.tar.xz' -or \
-name '*.pkg.tar.zst' \
\) -printf '%P\0' | \
xargs -r0 repo-add $(REPO).db.tar.$(REPOEXT) \
rm -f $@
if [ -f $@.tar.$(REPOEXT) ]; then \
cp $@.tar.$(REPOEXT) $@; \
rm -f $(basename $@).files
if [ -f $(basename $@).files.tar.$(REPOEXT) ]; then \
cp $(basename $@).files.tar.$(REPOEXT) $(basename $@).files; \
db-%: repo/%/$(REPO).db
abs-%: repo/%/$(REPO).abs.tar.gz
sync-%: abs-% db-%
#s3cmd sync --delete-removed -P repo/$*/ s3://arch-linux-ami/repo/$*/
test-%: abs-% db-%
rsync -Pav --delete repo/$*/. korriban:/srv/http/uplinklabs/repo/$(REPO)/$*/.
abs: $(patsubst %,abs-%,$(ARCHES))
db: $(patsubst %,db-%,$(ARCHES))
sync: $(patsubst %,sync-%,$(ARCHES))
test: $(patsubst %,test-%,$(ARCHES))