1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

speedo: Add install target for Unix.

* build-aux/speedo.mk: Default to SELFCHECK=0.
(install, install-speedo): New targets.
--

GnuPG-bug-id: 6710
This commit is contained in:
Werner Koch 2024-01-12 13:25:06 +01:00
parent 5a6df94a9a
commit 3f12e3dacb
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
2 changed files with 65 additions and 13 deletions

11
README
View File

@ -85,11 +85,18 @@
To quickly build all required software without installing it, the To quickly build all required software without installing it, the
Speedo target may be used: Speedo target may be used:
make speedo make -f build-aux/speedo.mk native
This target downloads all required libraries and does a native build This target downloads all required libraries and does a native build
of GnuPG to PLAY/inst/. GNU make and the patchelf tool are of GnuPG to PLAY/inst/. GNU make and the patchelf tool are
required. Follow the instructions give at the end of the make run. required. After the build the entire software including all
libraries can be installed into an arbitrary location using for
example:
make -f build-aux/speedo.mk install SYSROOT=/usr/local/gnupg-foo
and adding the directory to PATH.
** Specific build problems on some machines: ** Specific build problems on some machines:

View File

@ -113,7 +113,7 @@ help:
@echo 'Prepend TARGET with "git-" to build from GIT repos.' @echo 'Prepend TARGET with "git-" to build from GIT repos.'
@echo 'Prepend TARGET with "this-" to build from the source tarball.' @echo 'Prepend TARGET with "this-" to build from the source tarball.'
@echo 'Use STATIC=1 to build with statically linked libraries.' @echo 'Use STATIC=1 to build with statically linked libraries.'
@echo 'Use SELFCHECK=0 for a non-released version.' @echo 'Use SELFCHECK=1 for additional check of the gnupg version.'
@echo 'Use CUSTOM_SWDB=1 for an already downloaded swdb.lst.' @echo 'Use CUSTOM_SWDB=1 for an already downloaded swdb.lst.'
@echo 'Use WIXPREFIX to provide the WIX binaries for the MSI package.' @echo 'Use WIXPREFIX to provide the WIX binaries for the MSI package.'
@echo ' Using WIX also requires wine with installed wine mono.' @echo ' Using WIX also requires wine with installed wine mono.'
@ -182,19 +182,17 @@ this-w32-source: check-tools
$(SPEEDOMAKE) TARGETOS=w32 WHAT=this CUSTOM_SWDB=1 dist-source $(SPEEDOMAKE) TARGETOS=w32 WHAT=this CUSTOM_SWDB=1 dist-source
w32-release: check-tools w32-release: check-tools
$(SPEEDOMAKE) TARGETOS=w32 WHAT=release SELFCHECK=0 \ $(SPEEDOMAKE) TARGETOS=w32 WHAT=release installer-from-source
installer-from-source
w32-msi-release: check-tools w32-msi-release: check-tools
$(SPEEDOMAKE) TARGETOS=w32 WHAT=release SELFCHECK=0 \ $(SPEEDOMAKE) TARGETOS=w32 WHAT=release \
WITH_WIXLIB=1 installer-from-source WITH_WIXLIB=1 installer-from-source
w32-sign-installer: check-tools w32-sign-installer: check-tools
$(SPEEDOMAKE) TARGETOS=w32 WHAT=release SELFCHECK=0 \ $(SPEEDOMAKE) TARGETOS=w32 WHAT=release sign-installer
sign-installer
w32-release-offline: check-tools w32-release-offline: check-tools
$(SPEEDOMAKE) TARGETOS=w32 WHAT=release SELFCHECK=0 \ $(SPEEDOMAKE) TARGETOS=w32 WHAT=release \
CUSTOM_SWDB=1 pkgrep=${HOME}/b pkg10rep=${HOME}/b \ CUSTOM_SWDB=1 pkgrep=${HOME}/b pkg10rep=${HOME}/b \
installer-from-source installer-from-source
@ -213,8 +211,8 @@ CUSTOM_SWDB=0
# Set to 1 to really download the swdb. # Set to 1 to really download the swdb.
UPD_SWDB=0 UPD_SWDB=0
# Set to 0 to skip the GnuPG version self-check # Set to 1 to run an additional GnuPG version check
SELFCHECK=1 SELFCHECK=0
# Set to 1 to build with statically linked libraries. # Set to 1 to build with statically linked libraries.
STATIC=0 STATIC=0
@ -645,6 +643,8 @@ speedo_pkg_gettext_make_dir = gettext-runtime
all: all-speedo all: all-speedo
install: install-speedo
report: report-speedo report: report-speedo
clean: clean-speedo clean: clean-speedo
@ -1129,10 +1129,55 @@ ifneq ($(TARGETOS),w32)
echo "rootdir = $(idir)" >>bin/gpgconf.ctl ;\ echo "rootdir = $(idir)" >>bin/gpgconf.ctl ;\
echo "speedo: /*" ;\ echo "speedo: /*" ;\
echo "speedo: * Now copy $(idir)/ to the final location and" ;\ echo "speedo: * Now copy $(idir)/ to the final location and" ;\
echo "speedo: * adjust $(idir)/bin/gpgconf.ctl accordingly." ;\ echo "speedo: * adjust $(idir)/bin/gpgconf.ctl accordingly" ;\
echo "speedo: * Or run:" ;\
echo "speedo: * make -f build-aux/speedo.mk install SYSROOT=/somewhere" ;\
echo "speedo: */") echo "speedo: */")
endif endif
# No dependencies for the install target; instead we test whether
# some of the to be installed files are available. This avoids
# accidental rebuilds under a wrong account.
install-speedo:
ifneq ($(TARGETOS),w32)
@(set -e; \
cd "$(idir)"; \
if [ x"$$SYSROOT" = x ]; then \
echo "speedo: ERROR: SYSROOT has not been given";\
echo "speedo: Set SYSROOT to the desired install directory";\
echo "speedo: Example:";\
echo "speedo: make -f build-aux/speedo.mk install SYSROOT=/usr/local";\
exit 1;\
fi;\
if [ ! -d "$$SYSROOT"/bin ]; then if ! mkdir "$$SYSROOT"/bin; then \
echo "speedo: error creating target directory";\
exit 1;\
fi; fi;\
if ! touch "$$SYSROOT"/bin/gpgconf.ctl; then \
echo "speedo: Error writing $$SYSROOT/bin/gpgconf.ctl";\
echo "speedo: Please check the permissions";\
exit 1;\
fi;\
if [ ! -f bin/gpgconf.ctl ]; then \
echo "speedo: ERROR: Nothing to install";\
echo "speedo: Please run a build first";\
echo "speedo: Example:";\
echo "speedo: make -f build-aux/speedo.mk native";\
exit 1;\
fi;\
echo "speedo: Installing files to $$SYSROOT";\
find . -type f -executable \
-exec install -Dm 755 "{}" "$$SYSROOT/{}" \; ;\
find . -type f \! -executable \
-exec install -Dm 644 "{}" "$$SYSROOT/{}" \; ;\
echo "sysconfdir = /etc" > "$$SYSROOT"/bin/gpgconf.ctl ;\
echo "rootdir = $$SYSROOT" >> "$$SYSROOT"/bin/gpgconf.ctl ;\
echo '/*' ;\
echo " * Installation to $$SYSROOT done" ;\
echo ' */' )
endif
report-speedo: $(addprefix report-,$(speedo_build_list)) report-speedo: $(addprefix report-,$(speedo_build_list))
# Just to check if we caught all stamps. # Just to check if we caught all stamps.
@ -1408,4 +1453,4 @@ check-tools: $(stampdir)/stamp-directories
# Mark phony targets # Mark phony targets
# #
.PHONY: all all-speedo report-speedo clean-stamps clean-speedo installer \ .PHONY: all all-speedo report-speedo clean-stamps clean-speedo installer \
w32_insthelpers check-tools clean-pkg-versions w32_insthelpers check-tools clean-pkg-versions install-speedo install