Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile128
1 files changed, 123 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 6c3aa63..e415f40 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,5 @@
+V=$(shell git describe --exact-match)
SHELL=/bin/bash
-
-V=1.0.2
BUILDTOOLVER ?= $(V)
PREFIX = /usr/local
@@ -19,6 +18,41 @@ PACMAN_CONFIGS=$(wildcard config/pacman/*)
SETARCH_ALIASES = $(wildcard config/setarch-aliases.d/*)
MANS = $(addprefix $(BUILDDIR)/,$(patsubst %.asciidoc,%,$(wildcard doc/man/*.asciidoc)))
+GENERATED_PACMAN_CONFIGS = \
+ core-testing-i486.conf \
+ core-testing-i686.conf \
+ core-testing-pentium4.conf \
+ core-staging-i486.conf \
+ core-staging-i686.conf \
+ core-staging-pentium4.conf \
+ core-staging-with-build-support-i486.conf \
+ core-staging-with-build-support-i686.conf \
+ core-staging-with-build-support-pentium4.conf \
+ extra-i486.conf \
+ extra-i686.conf \
+ extra-pentium4.conf \
+ extra-testing-i486.conf \
+ extra-testing-i686.conf \
+ extra-testing-pentium4.conf \
+ extra-staging-i486.conf \
+ extra-staging-i686.conf \
+ extra-staging-pentium4.conf \
+ extra-staging-with-build-support-i486.conf \
+ extra-staging-with-build-support-i686.conf \
+ extra-staging-with-build-support-pentium4.conf \
+ kde-unstable-i486.conf \
+ kde-unstable-i686.conf \
+ kde-unstable-pentium4.conf \
+ gnome-unstable-i486.conf \
+ gnome-unstable-i686.conf \
+ gnome-unstable-pentium4.conf
+GENERATED_MAKEPKG_CONFIGS = \
+ i486.conf \
+ i686.conf \
+ pentium4.conf
+GENERATED_PACMAN_CONFIGS := $(addprefix $(BUILDDIR)/pacman.conf.d/,$(GENERATED_PACMAN_CONFIGS))
+GENERATED_MAKEPKG_CONFIGS := $(addprefix $(BUILDDIR)/makepkg.conf.d/,$(GENERATED_MAKEPKG_CONFIGS))
+
COMMITPKG_LINKS = \
core-testingpkg \
core-stagingpkg \
@@ -32,29 +66,58 @@ COMMITPKG_LINKS = \
gnome-unstablepkg
ARCHBUILD_LINKS = \
+ core-testing-i486-build \
+ core-testing-i686-build \
+ core-testing-pentium4-build \
core-testing-x86_64-build \
core-testing-x86_64_v3-build \
+ core-staging-i486-build \
+ core-staging-i686-build \
+ core-staging-pentium4-build \
core-staging-x86_64-build \
core-staging-x86_64_v3-build \
+ core-staging-x86_64-build \
+ core-staging-with-build-support-i486-build \
+ core-staging-with-build-support-i686-build \
+ core-staging-with-build-support-pentium4-build \
+ extra-i486-build \
+ extra-i686-build \
+ extra-pentium4-build \
extra-x86_64-build \
extra-x86_64_v3-build \
+ extra-testing-i486-build \
+ extra-testing-i686-build \
+ extra-testing-pentium4-build \
extra-testing-x86_64-build \
extra-testing-x86_64_v3-build \
+ extra-staging-i486-build \
+ extra-staging-i686-build \
+ extra-staging-pentium4-build \
extra-staging-x86_64-build \
extra-staging-x86_64_v3-build \
+ extra-staging-with-build-support-i486-build \
+ extra-staging-with-build-support-i686-build \
+ extra-staging-with-build-support-pentium4-build \
multilib-build \
multilib-testing-build \
multilib-staging-build \
+ kde-unstable-i486-build \
+ kde-unstable-i686-build \
+ kde-unstable-pentium4-build \
kde-unstable-x86_64-build \
+ gnome-unstable-i486-build \
+ gnome-unstable-i686-build \
+ gnome-unstable-pentium4-build \
gnome-unstable-x86_64-build
COMPLETIONS = $(addprefix $(BUILDDIR)/,$(patsubst %.in,%,$(wildcard contrib/completion/*/*)))
-all: binprogs library conf completion man
+all: binprogs library conf completion man configfiles
binprogs: $(BINPROGS)
library: $(LIBRARY)
completion: $(COMPLETIONS)
+configfiles: $(GENERATED_MAKEPKG_CONFIGS) $(GENERATED_PACMAN_CONFIGS)
man: $(MANS)
@@ -77,6 +140,56 @@ edit = sed \
-e "s|@buildtoolver[@]|$(BUILDTOOLVER)|g"
GEN_MSG = @echo "GEN $(patsubst $(BUILDDIR)/%,%,$@)"
+$(BUILDDIR)/makepkg.conf.d/i486.conf: config/makepkg/x86_64.conf
+ @echo "GEN $(notdir $@)"
+ @mkdir -p $(dir $@)
+ @sed " \
+ s,\(["'"'"=]\)x86[-_]64\([-"'"'" ]\),\1i486\2,g; \
+ s,-fcf-protection,,g; \
+ s,LTOFLAGS=".*",LTOFLAGS=\"-fno-lto\",g; \
+ /OPTIONS=/s/ lto/ !lto/; \
+ " "$<" > "$@"
+ @sed -i 's/--ultra -20/--ultra -19/' "$@"
+
+$(BUILDDIR)/makepkg.conf.d/i686.conf: config/makepkg/x86_64.conf
+ @echo "GEN $(notdir $@)"
+ @mkdir -p $(dir $@)
+ @sed " \
+ s,\(["'"'"=]\)x86[-_]64\([-"'"'" ]\),\1i686\2,g; \
+ s,-fcf-protection,,g; \
+ " "$<" > "$@"
+ @sed -i 's/--ultra -20/--ultra -19/' "$@"
+
+$(BUILDDIR)/makepkg.conf.d/pentium4.conf: $(BUILDDIR)/makepkg.conf.d/i686.conf
+ @echo "GEN $(notdir $@)"
+ @mkdir -p $(dir $@)
+ @sed '/^CHOST=/ ! s,\(["=]\)i686\([-" ]\),\1pentium4\2,g' "$<" > "$@"
+ @sed -i 's/--ultra -20/--ultra -19/' "$@"
+
+$(BUILDDIR)/pacman.conf.d/%-i486.conf: config/pacman/%.conf
+ @echo "GEN $(notdir $@)"
+ @mkdir -p $(dir $@)
+ @sed " \
+ s,/mirrorlist\$$,\032,; \
+ /^Architecture = / s/^.*\$$/Architecture = i486/; \
+ " "$<" > "$@"
+
+$(BUILDDIR)/pacman.conf.d/%-i686.conf: config/pacman/%.conf
+ @echo "GEN $(notdir $@)"
+ @mkdir -p $(dir $@)
+ @sed " \
+ s,/mirrorlist\$$,\032,; \
+ /^Architecture = / s/^.*$$/Architecture = i686/ \
+ " "$<" > "$@"
+
+$(BUILDDIR)/pacman.conf.d/%-pentium4.conf: config/pacman/%.conf
+ @echo "GEN $(notdir $@)"
+ @mkdir -p $(dir $@)
+ @sed " \
+ s,/mirrorlist\$$,\032,; \
+ /^Architecture = / s/^.*$$/Architecture = pentium4/ \
+ " "$<" > "$@"
+
define buildInScript
$(1)/%: $(2)%$(3)
$$(GEN_MSG)
@@ -113,7 +226,9 @@ install: all
install -dm0755 $(DESTDIR)$(DATADIR)/lib
cp -ra $(BUILDDIR)/lib/* $(DESTDIR)$(DATADIR)/lib
for conf in $(notdir $(MAKEPKG_CONFIGS)); do install -Dm0644 $(BUILDDIR)/makepkg.conf.d/$$conf $(DESTDIR)$(DATADIR)/makepkg.conf.d/$${conf##*/}; done
+ for conf in $(notdir $(GENERATED_MAKEPKG_CONFIGS)); do install -Dm0644 $(BUILDDIR)/makepkg.conf.d/$$conf $(DESTDIR)$(DATADIR)/makepkg.conf.d/$${conf##*/}; done
for conf in $(notdir $(PACMAN_CONFIGS)); do install -Dm0644 $(BUILDDIR)/pacman.conf.d/$$conf $(DESTDIR)$(DATADIR)/pacman.conf.d/$${conf##*/}; done
+ for conf in $(notdir $(GENERATED_PACMAN_CONFIGS)); do install -Dm0644 $(BUILDDIR)/pacman.conf.d/$$conf $(DESTDIR)$(DATADIR)/pacman.conf.d/$${conf##*/}; done
for a in ${SETARCH_ALIASES}; do install -m0644 $$a -t $(DESTDIR)$(DATADIR)/setarch-aliases.d; done
for l in ${COMMITPKG_LINKS}; do ln -sf commitpkg $(DESTDIR)$(PREFIX)/bin/$$l; done
for l in ${ARCHBUILD_LINKS}; do ln -sf archbuild $(DESTDIR)$(PREFIX)/bin/$$l; done
@@ -156,8 +271,11 @@ release: dist
glab release create v$(RELEASE) devtools-$(RELEASE).tar.gz*
dist:
- git archive --format=tar --prefix=devtools-$(V)/ v$(V) | gzip > devtools-$(V).tar.gz
- gpg --detach-sign --use-agent devtools-$(V).tar.gz
+ git archive --format=tar --prefix=devtools32-$(V)/ v$(V) | gzip > devtools32-$(V).tar.gz
+ gpg --detach-sign --use-agent devtools32-$(V).tar.gz
+
+upload:
+ scp devtools32-$(V).tar.gz devtools32-$(V).tar.gz.sig sources.archlinux32.org:httpdocs/sources/
check: $(BINPROGS_SRC) $(LIBRARY_SRC) contrib/completion/bash/devtools.in config/makepkg/x86_64.conf contrib/makepkg/PKGBUILD.proto
shellcheck $^