diff --git a/cross/bzip2/Makefile b/cross/bzip2/Makefile index 586f0e69..15cfaedf 100644 --- a/cross/bzip2/Makefile +++ b/cross/bzip2/Makefile @@ -12,21 +12,21 @@ COMMENT = High-quality data compressor LICENSE = BSD License CONFIGURE_TARGET = nop -COMPILE_TARGET = myCompile -INSTALL_TARGET = myInstall +COMPILE_TARGET = bzip2_compile +INSTALL_TARGET = bzip2_install ADDITIONAL_CFLAGS = -fpic -fPIC -O3 -D_FILE_OFFSET_BITS=64 include ../../mk/spksrc.cross-cc.mk -.PHONY: myCompile -myCompile: - $(RUN) $(MAKE) bzip2 bzip2recover PREFIX=$(STAGING_INSTALL_PREFIX) - $(RUN) $(MAKE) -f Makefile-libbz2_so PREFIX=$(STAGING_INSTALL_PREFIX) +.PHONY: bzip2_compile +bzip2_compile: + $(RUN) $(MAKE) bzip2 bzip2recover PREFIX=$(INSTALL_PREFIX) + $(RUN) $(MAKE) -f Makefile-libbz2_so PREFIX=$(INSTALL_PREFIX) -.PHONY: myInstall -myInstall: - @$(RUN) $(MAKE) PREFIX=$(STAGING_INSTALL_PREFIX) install +.PHONY: bzip2_install +bzip2_install: + @$(RUN) $(MAKE) DESTDIR=$(INSTALL_DIR) PREFIX=$(INSTALL_PREFIX) install ln -sf bzip2 $(STAGING_INSTALL_PREFIX)/bin/bunzip2 ln -sf bzip2 $(STAGING_INSTALL_PREFIX)/bin/bzcat ln -sf bzdiff $(STAGING_INSTALL_PREFIX)/bin/bzcmp diff --git a/cross/ddrescue/Makefile b/cross/ddrescue/Makefile index 4b0f3202..e4189c43 100644 --- a/cross/ddrescue/Makefile +++ b/cross/ddrescue/Makefile @@ -12,6 +12,4 @@ HOMEPAGE = http://www.gnu.org/software/ddrescue/ COMMENT = GNU ddrescue is a data recovery tool. It copies data from one file or block device (hard disc, cdrom, etc) to another, trying hard to rescue data in case of read errors. LICENSE = GNU GPL -CONFIGURE_ARGS = --prefix="$(STAGING_INSTALL_PREFIX)" - include ../../mk/spksrc.cross-cc.mk diff --git a/cross/fdupes/Makefile b/cross/fdupes/Makefile index adcc7e05..49720af8 100755 --- a/cross/fdupes/Makefile +++ b/cross/fdupes/Makefile @@ -11,10 +11,4 @@ LICENSE = MIT CONFIGURE_TARGET = none -INSTALL_TARGET = myInstall - include ../../mk/spksrc.cross-cc.mk - -.PHONY: myInstall -myInstall: - $(RUN) $(MAKE) install PREFIX=$(STAGING_INSTALL_PREFIX) diff --git a/cross/fuse/Makefile b/cross/fuse/Makefile index 1153c50d..4e849958 100644 --- a/cross/fuse/Makefile +++ b/cross/fuse/Makefile @@ -12,7 +12,5 @@ COMMENT = The reference implementation of the Linux FUSE (Filesystem in Userspa LICENSE = GNU GPLv2 GNU_CONFIGURE = 1 -CONFIGURE_ARGS = --exec-prefix=$(STAGING_INSTALL_PREFIX) include ../../mk/spksrc.cross-cc.mk - diff --git a/cross/he853/Makefile b/cross/he853/Makefile index e52d7395..ac0fb612 100644 --- a/cross/he853/Makefile +++ b/cross/he853/Makefile @@ -13,11 +13,11 @@ LICENSE = GPLv2 CONFIGURE_TARGET = none -INSTALL_TARGET = myInstall +INSTALL_TARGET = he853_install include ../../mk/spksrc.cross-cc.mk -.PHONY: myInstall -myInstall: +.PHONY: he853_install +he853_install: mkdir -p $(STAGING_INSTALL_PREFIX)/lib/udev/rules.d - $(RUN) $(MAKE) install PREFIX=$(STAGING_INSTALL_PREFIX) MY_UDEV_RULES=$(STAGING_INSTALL_PREFIX)/lib/udev/rules.d + $(RUN) $(MAKE) install DESTDIR=$(INSTALL_DIR) PREFIX=$(INSTALL_PREFIX) MY_UDEV_RULES=$(STAGING_INSTALL_PREFIX)/lib/udev/rules.d diff --git a/cross/libxml2/Makefile b/cross/libxml2/Makefile index 8ac58aaf..0f75eefe 100644 --- a/cross/libxml2/Makefile +++ b/cross/libxml2/Makefile @@ -11,13 +11,13 @@ HOMEPAGE = http://xmlsoft.org COMMENT = Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform) LICENSE = MIT -CONFIGURE_ARGS = --without-python --with-zlib=$(STAGING_INSTALL_PREFIX) +CONFIGURE_ARGS = --without-python GNU_CONFIGURE = 1 ADDITIONAL_CFLAGS = -O3 -POST_INSTALL_TARGET = myPostInstall +POST_INSTALL_TARGET = libxml2_post_install include ../../mk/spksrc.cross-cc.mk -.PHONY: myPostInstall -myPostInstall: +.PHONY: libxml2_post_install +libxml2_post_install: sed -i -e 's|^prefix=$(INSTALL_PREFIX)$$|prefix=$(STAGING_INSTALL_PREFIX)|' $(STAGING_INSTALL_PREFIX)/bin/xml2-config diff --git a/cross/libxslt/Makefile b/cross/libxslt/Makefile index 0a05770d..22ac5a5c 100644 --- a/cross/libxslt/Makefile +++ b/cross/libxslt/Makefile @@ -12,7 +12,6 @@ COMMENT = Libxslt is the XSLT C library developed for the GNOME project LICENSE = MIT CONFIGURE_ARGS = --without-python --with-libxml-prefix=$(STAGING_INSTALL_PREFIX) -CONFIGURE_ARGS += --with-libxml-include-prefix=$(STAGING_INSTALL_PREFIX)/include/libxml2 GNU_CONFIGURE = 1 # if for libgcrypt, replace the -config path with abspath diff --git a/cross/lirc-0.8.7/Makefile b/cross/lirc-0.8.7/Makefile index 9a7736bc..a0b16b81 100644 --- a/cross/lirc-0.8.7/Makefile +++ b/cross/lirc-0.8.7/Makefile @@ -16,7 +16,6 @@ GNU_CONFIGURE = 1 CONFIGURE_ARGS = --with-transmitter --with-driver=all --with-moduledir=$(MOD_DIR) --enable-sandboxed --with-kerneldir=$(KERNEL_DIR) POST_CONFIGURE_TARGET = lirc_kill_drivers -INSTALL_TARGET = lirc_custom_install # These drivers would not make and are likely un-needed anyway KILL_DRIVERS = lirc_wpc8769l @@ -28,9 +27,7 @@ endif include ../../mk/spksrc.cross-cc.mk -.PHONY: lirc_custom_install lirc_kill_drivers -lirc_custom_install: - $(RUN) $(MAKE) install DESTDIR=$(STAGING_INSTALL_PREFIX) prefix="" +.PHONY: lirc_kill_drivers lirc_kill_drivers: @for DRIVER in $(KILL_DRIVERS); do \ echo -e ".PHONY: all install\nall:\ninstall:\n" > $(WORK_DIR)/$(PKG_DIR)/drivers/$$DRIVER/Makefile; \ diff --git a/cross/lirc-0.9.0/Makefile b/cross/lirc-0.9.0/Makefile index 94c1743f..b585fc14 100644 --- a/cross/lirc-0.9.0/Makefile +++ b/cross/lirc-0.9.0/Makefile @@ -16,12 +16,9 @@ GNU_CONFIGURE = 1 CONFIGURE_ARGS = --with-transmitter --with-driver=userspace --with-moduledir=$(MOD_DIR) --enable-sandboxed --with-kerneldir=$(KERNEL_DIR) #POST_CONFIGURE_TARGET = lirc_kill_wpc8769l -INSTALL_TARGET = lirc_custom_install include ../../mk/spksrc.cross-cc.mk -.PHONY: lirc_custom_install lirc_kill_wpc8769l -lirc_custom_install: - $(RUN) $(MAKE) install DESTDIR=$(STAGING_INSTALL_PREFIX) prefix="" +.PHONY: lirc_kill_wpc8769l lirc_kill_wpc8769l: echo -e ".PHONY: all install\nall:\ninstall:\n" > $(WORK_DIR)/$(PKG_DIR)/drivers/lirc_wpc8769l/Makefile diff --git a/cross/lz4/Makefile b/cross/lz4/Makefile index 4ad7b13d..950ba8fb 100644 --- a/cross/lz4/Makefile +++ b/cross/lz4/Makefile @@ -13,11 +13,5 @@ COMMENT = LZ4 is lossless compression algorithm, providing compression speed at LICENSE = BSD CONFIGURE_TARGET = nop -INSTALL_TARGET = myInstall include ../../mk/spksrc.cross-cc.mk - -.PHONY: myInstall -myInstall: - $(RUN) $(MAKE) install PREFIX=$(STAGING_INSTALL_PREFIX) - diff --git a/cross/ncurses/Makefile b/cross/ncurses/Makefile index 29a96076..11b56446 100644 --- a/cross/ncurses/Makefile +++ b/cross/ncurses/Makefile @@ -13,8 +13,7 @@ LICENSE = http://www.gnu.org/licenses/gpl.html GNU_CONFIGURE = 1 CONFIGURE_ARGS = --with-shared --enable-rpath --without-manpages --without-tests --enable-overwrite --disable-widec -CONFIGURE_ARGS += --disable-home-terminfo --with-default-terminfo-dir=$(INSTALL_DIR)/$(INSTALL_PREFIX)/share/terminfo +CONFIGURE_ARGS += --disable-home-terminfo CONFIGURE_ARGS += --disable-stripping --with-terminfo-dirs=$(INSTALL_PREFIX)/share/terminfo include ../../mk/spksrc.cross-cc.mk - diff --git a/cross/ncursesw/Makefile b/cross/ncursesw/Makefile index 529bceb6..b89f81ad 100644 --- a/cross/ncursesw/Makefile +++ b/cross/ncursesw/Makefile @@ -13,7 +13,7 @@ LICENSE = http://www.gnu.org/licenses/gpl.html GNU_CONFIGURE = 1 CONFIGURE_ARGS = --with-shared --enable-rpath --without-manpages --without-tests --enable-overwrite --enable-widec -CONFIGURE_ARGS += --disable-home-terminfo --with-default-terminfo-dir=$(INSTALL_DIR)/$(INSTALL_PREFIX)/share/terminfo +CONFIGURE_ARGS += --disable-home-terminfo CONFIGURE_ARGS += --disable-stripping --with-terminfo-dirs=$(INSTALL_PREFIX)/share/terminfo include ../../mk/spksrc.cross-cc.mk diff --git a/cross/openssh/Makefile b/cross/openssh/Makefile index 552476cc..5065cb2e 100644 --- a/cross/openssh/Makefile +++ b/cross/openssh/Makefile @@ -11,15 +11,7 @@ HOMEPAGE = http://www.openssh.com/ COMMENT = Open source version of SSH connectivity tools LICENSE = -DESTDIR = $(INSTALL_DIR) - -CONFIGURE_ARGS = cross_compiling=yes --disable-lastlog --disable-utmp --disable-utmpx --disable-wtmp --disable-wtmpx -CONFIGURE_ARGS += --disable-strip --with-zlib=$(STAGING_INSTALL_PREFIX) --with-ssl-dir=$(STAGING_INSTALL_PREFIX) LD=$$CC -INSTALL_TARGET = myInstall +CONFIGURE_ARGS += cross_compiling=yes --disable-lastlog --disable-utmp --disable-utmpx --disable-wtmp --disable-wtmpx +CONFIGURE_ARGS += --disable-strip LD=$$CC include ../../mk/spksrc.cross-cc.mk - -.PHONY: myInstall -myInstall: - $(RUN) $(MAKE) install DESTDIR=$(INSTALL_DIR) - diff --git a/cross/openssl/Makefile b/cross/openssl/Makefile index b34175e6..0501b95d 100644 --- a/cross/openssl/Makefile +++ b/cross/openssl/Makefile @@ -11,9 +11,9 @@ HOMEPAGE = http://www.openssl.org COMMENT = Compression Library LICENSE = http://www.openssl.org/source/license.html -CONFIGURE_TARGET = myConfigure +CONFIGURE_TARGET = openssl_configure -INSTALL_TARGET = myInstall +INSTALL_TARGET = openssl_install STAGING_INSTALL_PREFIX := $(INSTALL_DIR) @@ -48,10 +48,10 @@ $(error Arch $(ARCH) not expected yet) endif -.PHONY: myConfigure -myConfigure: +.PHONY: openssl_configure +openssl_configure: $(RUN) ./Configure --openssldir=$(INSTALL_PREFIX) $(OPENSSL_ARCH) zlib-dynamic shared threads -.PHONY: myInstall -myInstall: +.PHONY: openssl_install +openssl_install: $(RUN) $(MAKE) install_sw INSTALL_PREFIX=$(INSTALL_DIR) diff --git a/cross/python3/Makefile b/cross/python3/Makefile index e75c225f..2b21ffc4 100644 --- a/cross/python3/Makefile +++ b/cross/python3/Makefile @@ -16,7 +16,7 @@ COMMENT = Python Programming Language LICENSE = PSF GNU_CONFIGURE = 1 -ADDITIONAL_CFLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -L $(WORK_DIR)/install/usr/local/python3/lib -I $(WORK_DIR)/install/usr/local/python3/include +ADDITIONAL_CFLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -L $(STAGING_INSTALL_PREFIX)/lib -I $(STAGING_INSTALL_PREFIX)/include CONFIGURE_ARGS = --enable-shared --enable-ipv6 --without-ensurepip --enable-loadable-sqlite-extensions PYTHON_FOR_BUILD=$(HOSTPYTHON) PGEN_FOR_BUILD=$(HOSTPGEN) CONFIGURE_ARGS += ac_cv_buggy_getaddrinfo=no ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no ac_cv_have_long_long_format=yes @@ -54,10 +54,10 @@ python3_pre_configure: # create phantom header and library to succeed add_dir_to_list in setup.py # so that future-promised libsqlite3.so and sqlite3.h will be used. Yep, # it's a bit hokey, but avoids editing upstream pristine source - mkdir -p $(WORK_DIR)/install/usr/local/python3/lib $(WORK_DIR)/install/usr/local/python3/include + mkdir -p $(STAGING_INSTALL_PREFIX)/lib $(STAGING_INSTALL_PREFIX)/include mkdir -p $(WORK_DIR)/Python-$(PKG_VERS)/Include $(WORK_DIR)/Python-$(PKG_VERS)/lib - test -h $(WORK_DIR)/Python-$(PKG_VERS)/Include/sqlite3.h || ln -fs $(WORK_DIR)/install/usr/local/python3/include/sqlite3.h $(WORK_DIR)/Python-$(PKG_VERS)/Include/sqlite3.h - test -h $(WORK_DIR)/Python-$(PKG_VERS)/lib/libsqlite3.so || ln -fs $(WORK_DIR)/install/usr/local/python3/lib/libsqlite3.so $(WORK_DIR)/Python-$(PKG_VERS)/lib/ + test -h $(WORK_DIR)/Python-$(PKG_VERS)/Include/sqlite3.h || ln -fs $(STAGING_INSTALL_PREFIX)/include/sqlite3.h $(WORK_DIR)/Python-$(PKG_VERS)/Include/sqlite3.h + test -h $(WORK_DIR)/Python-$(PKG_VERS)/lib/libsqlite3.so || ln -fs $(STAGING_INSTALL_PREFIX)/lib/libsqlite3.so $(WORK_DIR)/Python-$(PKG_VERS)/lib/ .PHONY: python3_custom_compile python3_custom_compile: diff --git a/cross/redis/Makefile b/cross/redis/Makefile index fe6907b8..e3308aa1 100644 --- a/cross/redis/Makefile +++ b/cross/redis/Makefile @@ -12,15 +12,10 @@ COMMENT = Redis is an open source, advanced key-value store. It is often referr LICENSE = BSD CONFIGURE_TARGET = nop -COMPILE_TARGET = myCompile -INSTALL_TARGET = myInstall +COMPILE_TARGET = redis_custom_compile include ../../mk/spksrc.cross-cc.mk -.PHONY: myCompile -myCompile: +.PHONY: redis_custom_compile +redis_custom_compile: $(RUN) $(MAKE) MALLOC=libc DEBUG= - -.PHONY: myInstall -myInstall: - $(RUN) $(MAKE) install PREFIX=$(STAGING_INSTALL_PREFIX) diff --git a/cross/shairport-sync/Makefile b/cross/shairport-sync/Makefile index 73274544..94893bac 100644 --- a/cross/shairport-sync/Makefile +++ b/cross/shairport-sync/Makefile @@ -14,7 +14,7 @@ LICENSE = https://raw.githubusercontent.com/mikebrady/shairport-sync/$(PKG_VERS GNU_CONFIGURE = 1 -CONFIGURE_ARGS = --prefix=$(STAGING_INSTALL_PREFIX) --with-alsa --with-ssl=openssl --with-tinysvcmdns --without-configfiles --with-piddir=$(INSTALL_DIR)/var +CONFIGURE_ARGS += --with-alsa --with-ssl=openssl --with-tinysvcmdns --without-configfiles --with-piddir=$(INSTALL_DIR)/var CONFIGURE_ARGS += ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes PRE_CONFIGURE_TARGET = myPreConfigure diff --git a/cross/umurmur/Makefile b/cross/umurmur/Makefile index f7a8bdb9..8f2c11a3 100644 --- a/cross/umurmur/Makefile +++ b/cross/umurmur/Makefile @@ -12,12 +12,14 @@ HOMEPAGE = https://github.com/umurmur/umurmur COMMENT = Minimalistic Murmur (Mumble server) LICENSE = BSD 3-clause License -CONFIGURE_TARGET = myConfigure +CONFIGURE_TARGET = umurmur_configure +INSTALL_TARGET = install_target -CMAKE_ARGS = -DSSL=openssl -DCMAKE_INSTALL_PREFIX=$(STAGING_INSTALL_PREFIX) +CMAKE_ARGS = -DSSL=openssl -DCMAKE_INSTALL_PREFIX=$(INSTALL_PREFIX) +CMAKE_ARGS += -DCMAKE_STAGING_PREFIX=$(STAGING_INSTALL_PREFIX) include ../../mk/spksrc.cross-cc.mk -.PHONY: myConfigure -myConfigure: +.PHONY: umurmur_configure +umurmur_configure: $(RUN) cmake ${CMAKE_ARGS} . diff --git a/cross/unrar/Makefile b/cross/unrar/Makefile index edf71132..0834ccee 100644 --- a/cross/unrar/Makefile +++ b/cross/unrar/Makefile @@ -12,11 +12,5 @@ COMMENT = Extract files from rar archives LICENSE = freeware CONFIGURE_TARGET = nop -INSTALL_TARGET = myInstall include ../../mk/spksrc.cross-cc.mk - -.PHONY: myInstall -myInstall: - $(RUN) $(MAKE) install DESTDIR=$(STAGING_INSTALL_PREFIX) - diff --git a/mk/spksrc.install.mk b/mk/spksrc.install.mk index f60fbb94..4841c2ad 100644 --- a/mk/spksrc.install.mk +++ b/mk/spksrc.install.mk @@ -6,14 +6,15 @@ # install_msg_target # $(PRE_INSTALL_PLIST) # pre_install_target (override with PRE_INSTALL_TARGET) -# install_target (override with INSTALL_TARGET) +# install_destdir_target (default override with INSTALL_TARGET) +# install_target (alternative for INSTALL_TARGET) # post_install_target (override with POST_INSTALL_TARGET) # $(INSTALL_PLIST) # install_correct_lib_files # Variables: # INSTALL_PREFIX Target directory where the software will be run. # INSTALL_DIR Where to install files. INSTALL_PREFIX will be added. -# STAGING_INSTALL_PREFIX Where to instll files, in extenso. +# STAGING_INSTALL_PREFIX Where to install files, in extenso. # Files: # $(WORK_DIR)/$(PKG_NAME).plist List of files installed. Can be used to build the PLIST file # of each software. @@ -30,7 +31,7 @@ else $(PRE_INSTALL_TARGET): $(PRE_INSTALL_PLIST) endif ifeq ($(strip $(INSTALL_TARGET)),) -INSTALL_TARGET = install_target +INSTALL_TARGET = install_destdir_target else $(INSTALL_TARGET): $(PRE_INSTALL_TARGET) endif @@ -39,7 +40,7 @@ POST_INSTALL_TARGET = post_install_target else $(POST_INSTALL_TARGET): $(INSTALL_TARGET) endif -$(INSTALL_PLIST): $(POST_INSTALL_TARGET) +$(INSTALL_PLIST): $(POST_INSTALL_TARGET) install_msg_target: @$(MSG) "Installing for $(NAME)" @@ -52,9 +53,12 @@ $(PRE_INSTALL_PLIST): pre_install_target: install_msg_target $(PRE_INSTALL_PLIST) install_target: $(PRE_INSTALL_TARGET) - $(RUN) $(MAKE) install prefix=$(STAGING_INSTALL_PREFIX) + $(RUN) $(MAKE) install prefix=$(INSTALL_PREFIX) -post_install_target: $(INSTALL_TARGET) +install_destdir_target: $(PRE_INSTALL_TARGET) + $(RUN) $(MAKE) DESTDIR=$(INSTALL_DIR) install prefix=$(INSTALL_PREFIX) + +post_install_target: $(INSTALL_TARGET) $(INSTALL_PLIST): find $(INSTALL_DIR)/$(INSTALL_PREFIX)/ \! -type d -printf '%P\n' | sort | \ @@ -64,7 +68,8 @@ install_correct_lib_files: $(INSTALL_PLIST) @for pc_file in `grep -e "^lib/pkgconfig/.*\.pc$$" $(INSTALL_PLIST)` ; \ do \ $(MSG) "Correcting pkg-config file $${pc_file}" ; \ - sed -i -e 's#\($(INSTALL_PREFIX)\)#$(INSTALL_DIR)\1#g' \ + sed -i -e 's#=\($(INSTALL_PREFIX)\)#=$(INSTALL_DIR)\1#g' \ + -e 's#-rpath,\([^ ,]*\)#-rpath,\1,-rpath-link,$(INSTALL_DIR)\1#g' \ -e 's#$$(libdir)#$${libdir}#g' $(INSTALL_DIR)/$(INSTALL_PREFIX)/$${pc_file} ; \ done @for la_file in `grep -e "^lib/.*\.la$$" $(INSTALL_PLIST)` ; \ @@ -82,4 +87,3 @@ $(INSTALL_COOKIE): install_correct_lib_files else install: ; endif -