diff --git a/checksums/jq-1.6.tar.gz.sha512 b/checksums/jq-1.6.tar.gz.sha512 new file mode 100644 index 000000000..bf0624ba2 --- /dev/null +++ b/checksums/jq-1.6.tar.gz.sha512 @@ -0,0 +1 @@ +5da71f53c325257f1f546a2520fe47828b495c953270df25ea0e37741463fdda72f0ba4d5b05b25114ec30f27a559344c2b024bacabf610759f4e3e9efadb480 diff --git a/checksums/onig-6.9.1.tar.gz.sha512 b/checksums/onig-6.9.1.tar.gz.sha512 new file mode 100644 index 000000000..5659f276f --- /dev/null +++ b/checksums/onig-6.9.1.tar.gz.sha512 @@ -0,0 +1 @@ +5454c161d2d45f2c992513a695ff586ffa99e44a27d7ac5498370e200adb664bb02f2d8cd7d73e61d467f626d1a9b41d9e6e3051e1ea1a021624f94f7d52975f diff --git a/make/jq.mk b/make/jq.mk new file mode 100644 index 000000000..f9a5e0869 --- /dev/null +++ b/make/jq.mk @@ -0,0 +1,252 @@ +########################################################### +# +# jq +# +########################################################### +# +# JQ_VERSION, JQ_SITE and JQ_SOURCE define +# the upstream location of the source code for the package. +# JQ_DIR is the directory which is created when the source +# archive is unpacked. +# JQ_UNZIP is the command used to unzip the source. +# It is usually "zcat" (for .gz) or "bzcat" (for .bz2) +# +# You should change all these variables to suit your package. +# Please make sure that you add a description, and that you +# list all your packages' dependencies, seperated by commas. +# +# If you list yourself as MAINTAINER, please give a valid email +# address, and indicate your irc nick if it cannot be easily deduced +# from your name or email address. If you leave MAINTAINER set to +# "NSLU2 Linux" other developers will feel free to edit. +# +JQ_URL=https://github.com/stedolan/jq/releases/download/jq-$(JQ_VERSION) +JQ_VERSION=1.6 +JQ_SOURCE=jq-$(JQ_VERSION).tar.gz +JQ_DIR=jq-$(JQ_VERSION) +JQ_UNZIP=zcat +JQ_MAINTAINER=NSLU2 Linux +JQ_DESCRIPTION=Lightweight and flexible command-line JSON processor +JQ_SECTION=util +JQ_PRIORITY=optional +JQ_DEPENDS=oniguruma +JQ_SUGGESTS= +JQ_CONFLICTS= + +# +# JQ_IPK_VERSION should be incremented when the ipk changes. +# +JQ_IPK_VERSION=1 + +# +# JQ_CONFFILES should be a list of user-editable files +#JQ_CONFFILES=$(TARGET_PREFIX)/etc/jq.conf $(TARGET_PREFIX)/etc/init.d/SXXjq + +# +# JQ_PATCHES should list any patches, in the the order in +# which they should be applied to the source code. +# +#JQ_PATCHES=$(JQ_SOURCE_DIR)/configure.patch + +# +# If the compilation of the package requires additional +# compilation or linking flags, then list them here. +# +JQ_CPPFLAGS= +JQ_LDFLAGS= + +# +# JQ_BUILD_DIR is the directory in which the build is done. +# JQ_SOURCE_DIR is the directory which holds all the +# patches and ipkg control files. +# JQ_IPK_DIR is the directory in which the ipk is built. +# JQ_IPK is the name of the resulting ipk files. +# +# You should not change any of these variables. +# +JQ_BUILD_DIR=$(BUILD_DIR)/jq +JQ_SOURCE_DIR=$(SOURCE_DIR)/jq +JQ_IPK_DIR=$(BUILD_DIR)/jq-$(JQ_VERSION)-ipk +JQ_IPK=$(BUILD_DIR)/jq_$(JQ_VERSION)-$(JQ_IPK_VERSION)_$(TARGET_ARCH).ipk +JQ_DEV_IPK_DIR=$(BUILD_DIR)/jq-dev-$(JQ_VERSION)-ipk +JQ_DEV_IPK=$(BUILD_DIR)/jq-dev_$(JQ_VERSION)-$(JQ_IPK_VERSION)_$(TARGET_ARCH).ipk + +.PHONY: jq-source jq-unpack jq jq-stage jq-ipk jq-clean jq-dirclean jq-check + +# +# This is the dependency on the source code. If the source is missing, +# then it will be fetched from the site using wget. +# $(JQ_URL) holds the link to the source, +# which is saved to $(DL_DIR)/$(JQ_SOURCE). +# When adding new package, remember to place sha512sum of the source to +# scripts/checksums/$(JQ_SOURCE).sha512 +# +$(DL_DIR)/$(JQ_SOURCE): + $(WGET) -P $(@D) $(JQ_URL)/$(@F) || \ + $(WGET) -P $(@D) $(SOURCES_NLO_SITE)/$(@F) + +# +# The source code depends on it existing within the download directory. +# This target will be called by the top level Makefile to download the +# source code's archive (.tar.gz, .bz2, etc.) +# +jq-source: $(DL_DIR)/$(JQ_SOURCE) $(JQ_PATCHES) + +# +# This target unpacks the source code in the build directory. +# If the source archive is not .tar.gz or .tar.bz2, then you will need +# to change the commands here. Patches to the source code are also +# applied in this target as required. +# +# This target also configures the build within the build directory. +# Flags such as LDFLAGS and CPPFLAGS should be passed into configure +# and NOT $(MAKE) below. Passing it to configure causes configure to +# correctly BUILD the Makefile with the right paths, where passing it +# to Make causes it to override the default search paths of the compiler. +# +# If the compilation of the package requires other packages to be staged +# first, then do that first (e.g. "$(MAKE) -stage -stage"). +# +# If the package uses GNU libtool, you should invoke $(PATCH_LIBTOOL) as +# shown below to make various patches to it. +# +$(JQ_BUILD_DIR)/.configured: $(DL_DIR)/$(JQ_SOURCE) $(JQ_PATCHES) make/jq.mk + $(MAKE) oniguruma-stage + rm -rf $(BUILD_DIR)/$(JQ_DIR) $(@D) + $(JQ_UNZIP) $(DL_DIR)/$(JQ_SOURCE) | tar -C $(BUILD_DIR) -xvf - + if test -n "$(JQ_PATCHES)" ; \ + then cat $(JQ_PATCHES) | \ + $(PATCH) -d $(BUILD_DIR)/$(JQ_DIR) -p0 ; \ + fi + if test "$(BUILD_DIR)/$(JQ_DIR)" != "$(@D)" ; \ + then mv $(BUILD_DIR)/$(JQ_DIR) $(@D) ; \ + fi + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + CPPFLAGS="$(STAGING_CPPFLAGS) $(JQ_CPPFLAGS)" \ + LDFLAGS="$(STAGING_LDFLAGS) $(JQ_LDFLAGS)" \ + ./configure \ + --build=$(GNU_HOST_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --target=$(GNU_TARGET_NAME) \ + --prefix=$(TARGET_PREFIX) \ + --disable-nls \ + --disable-static \ + --disable-valgrind \ + --disable-docs \ + ) + $(PATCH_LIBTOOL) $(@D)/libtool + touch $@ + +jq-unpack: $(JQ_BUILD_DIR)/.configured + +# +# This builds the actual binary. +# +$(JQ_BUILD_DIR)/.built: $(JQ_BUILD_DIR)/.configured + rm -f $@ + $(MAKE) -C $(@D) + touch $@ +# +# This is the build convenience target. +# +jq: $(JQ_BUILD_DIR)/.built + +# +# If you are building a library, then you need to stage it too. +# +$(JQ_BUILD_DIR)/.staged: $(JQ_BUILD_DIR)/.built + rm -f $@ + $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install + touch $@ + +jq-stage: $(JQ_BUILD_DIR)/.staged + +# +# This rule creates a control file for ipkg. It is no longer +# necessary to create a seperate control file under sources/jq +# +$(JQ_IPK_DIR)/CONTROL/control: + @$(INSTALL) -d $(@D) + @rm -f $@ + @echo "Package: jq" >>$@ + @echo "Architecture: $(TARGET_ARCH)" >>$@ + @echo "Priority: $(JQ_PRIORITY)" >>$@ + @echo "Section: $(JQ_SECTION)" >>$@ + @echo "Version: $(JQ_VERSION)-$(JQ_IPK_VERSION)" >>$@ + @echo "Maintainer: $(JQ_MAINTAINER)" >>$@ + @echo "Source: $(JQ_URL)" >>$@ + @echo "Description: $(JQ_DESCRIPTION)" >>$@ + @echo "Depends: $(JQ_DEPENDS)" >>$@ + @echo "Suggests: $(JQ_SUGGESTS)" >>$@ + @echo "Conflicts: $(JQ_CONFLICTS)" >>$@ + +$(JQ_DEV_IPK_DIR)/CONTROL/control: + @$(INSTALL) -d $(@D) + @rm -f $@ + @echo "Package: jq-dev" >>$@ + @echo "Architecture: $(TARGET_ARCH)" >>$@ + @echo "Priority: $(JQ_PRIORITY)" >>$@ + @echo "Section: $(JQ_SECTION)" >>$@ + @echo "Version: $(JQ_VERSION)-$(JQ_IPK_VERSION)" >>$@ + @echo "Maintainer: $(JQ_MAINTAINER)" >>$@ + @echo "Source: $(JQ_URL)" >>$@ + @echo "Description: Development files for JQ" >>$@ + @echo "Depends: jq" >>$@ + @echo "Suggests: $(JQ_SUGGESTS)" >>$@ + @echo "Conflicts: $(JQ_CONFLICTS)" >>$@ + +# +# This builds the IPK file. +# +# Binaries should be installed into $(JQ_IPK_DIR)$(TARGET_PREFIX)/sbin or $(JQ_IPK_DIR)$(TARGET_PREFIX)/bin +# (use the location in a well-known Linux distro as a guide for choosing sbin or bin). +# Libraries and include files should be installed into $(JQ_IPK_DIR)$(TARGET_PREFIX)/{lib,include} +# Configuration files should be installed in $(JQ_IPK_DIR)$(TARGET_PREFIX)/etc/jq/... +# Documentation files should be installed in $(JQ_IPK_DIR)$(TARGET_PREFIX)/doc/jq/... +# Daemon startup scripts should be installed in $(JQ_IPK_DIR)$(TARGET_PREFIX)/etc/init.d/S??jq +# +# You may need to patch your application to make it use these locations. +# +$(JQ_IPK) $(JQ_DEV_IPK): $(JQ_BUILD_DIR)/.built + rm -rf $(JQ_IPK_DIR) $(BUILD_DIR)/jq_*_$(TARGET_ARCH).ipk \ + $(JQ_DEV_IPK_DIR) $(BUILD_DIR)/jq-dev_*_$(TARGET_ARCH).ipk + $(MAKE) -C $(JQ_BUILD_DIR) DESTDIR=$(JQ_IPK_DIR) install-strip + $(MAKE) -C $(JQ_BUILD_DIR) DESTDIR=$(JQ_DEV_IPK_DIR) install-strip + rm -fr $(JQ_IPK_DIR)$(TARGET_PREFIX)/include \ + $(JQ_IPK_DIR)$(TARGET_PREFIX)/lib/*.la \ + $(JQ_IPK_DIR)$(TARGET_PREFIX)/share/doc + rm -fr $(JQ_DEV_IPK_DIR)$(TARGET_PREFIX)/bin \ + $(JQ_DEV_IPK_DIR)$(TARGET_PREFIX)/lib \ + $(JQ_DEV_IPK_DIR)$(TARGET_PREFIX)/share + $(MAKE) $(JQ_IPK_DIR)/CONTROL/control + $(MAKE) $(JQ_DEV_IPK_DIR)/CONTROL/control + cd $(BUILD_DIR); $(IPKG_BUILD) $(JQ_IPK_DIR) + cd $(BUILD_DIR); $(IPKG_BUILD) $(JQ_DEV_IPK_DIR) + $(WHAT_TO_DO_WITH_IPK_DIR) $(JQ_IPK_DIR) $(JQ_DEV_IPK_DIR) + +# +# This is called from the top level makefile to create the IPK file. +# +jq-ipk: $(JQ_IPK) $(JQ_DEV_IPK) + +# +# This is called from the top level makefile to clean all of the built files. +# +jq-clean: + rm -f $(JQ_BUILD_DIR)/.built + -$(MAKE) -C $(JQ_BUILD_DIR) clean + +# +# This is called from the top level makefile to clean all dynamically created +# directories. +# +jq-dirclean: + rm -rf $(BUILD_DIR)/$(JQ_DIR) $(JQ_BUILD_DIR) $(JQ_IPK_DIR) $(JQ_IPK) \ + $(JQ_DEV_IPK_DIR) $(JQ_DEV_IPK) +# +# +# Some sanity check for the package. +# +jq-check: $(JQ_IPK) $(JQ_DEV_IPK) + perl scripts/optware-check-package.pl --target=$(OPTWARE_TARGET) $^ diff --git a/make/oniguruma.mk b/make/oniguruma.mk new file mode 100644 index 000000000..901a2a1ab --- /dev/null +++ b/make/oniguruma.mk @@ -0,0 +1,253 @@ +########################################################### +# +# oniguruma +# +########################################################### +# +# ONIGURUMA_VERSION, ONIGURUMA_SITE and ONIGURUMA_SOURCE define +# the upstream location of the source code for the package. +# ONIGURUMA_DIR is the directory which is created when the source +# archive is unpacked. +# ONIGURUMA_UNZIP is the command used to unzip the source. +# It is usually "zcat" (for .gz) or "bzcat" (for .bz2) +# +# You should change all these variables to suit your package. +# Please make sure that you add a description, and that you +# list all your packages' dependencies, seperated by commas. +# +# If you list yourself as MAINTAINER, please give a valid email +# address, and indicate your irc nick if it cannot be easily deduced +# from your name or email address. If you leave MAINTAINER set to +# "NSLU2 Linux" other developers will feel free to edit. +# +ONIGURUMA_URL=https://github.com/kkos/oniguruma/releases/download/v$(ONIGURUMA_VERSION) +ONIGURUMA_VERSION=6.9.1 +ONIGURUMA_SOURCE=onig-$(ONIGURUMA_VERSION).tar.gz +ONIGURUMA_DIR=onig-$(ONIGURUMA_VERSION) +ONIGURUMA_UNZIP=zcat +ONIGURUMA_MAINTAINER=NSLU2 Linux +ONIGURUMA_DESCRIPTION=Regex Library Supporting Different Character Encodings +ONIGURUMA_SECTION=lib +ONIGURUMA_PRIORITY=optional +ONIGURUMA_DEPENDS= +ONIGURUMA_SUGGESTS= +ONIGURUMA_CONFLICTS= + +# +# ONIGURUMA_IPK_VERSION should be incremented when the ipk changes. +# +ONIGURUMA_IPK_VERSION=1 + +# +# ONIGURUMA_CONFFILES should be a list of user-editable files +#ONIGURUMA_CONFFILES=$(TARGET_PREFIX)/etc/oniguruma.conf $(TARGET_PREFIX)/etc/init.d/SXXoniguruma + +# +# ONIGURUMA_PATCHES should list any patches, in the the order in +# which they should be applied to the source code. +# +#ONIGURUMA_PATCHES=$(ONIGURUMA_SOURCE_DIR)/configure.patch + +# +# If the compilation of the package requires additional +# compilation or linking flags, then list them here. +# +ONIGURUMA_CPPFLAGS= +ONIGURUMA_LDFLAGS= + +# +# ONIGURUMA_BUILD_DIR is the directory in which the build is done. +# ONIGURUMA_SOURCE_DIR is the directory which holds all the +# patches and ipkg control files. +# ONIGURUMA_IPK_DIR is the directory in which the ipk is built. +# ONIGURUMA_IPK is the name of the resulting ipk files. +# +# You should not change any of these variables. +# +ONIGURUMA_BUILD_DIR=$(BUILD_DIR)/oniguruma +ONIGURUMA_SOURCE_DIR=$(SOURCE_DIR)/oniguruma +ONIGURUMA_IPK_DIR=$(BUILD_DIR)/oniguruma-$(ONIGURUMA_VERSION)-ipk +ONIGURUMA_IPK=$(BUILD_DIR)/oniguruma_$(ONIGURUMA_VERSION)-$(ONIGURUMA_IPK_VERSION)_$(TARGET_ARCH).ipk +ONIGURUMA_DEV_IPK_DIR=$(BUILD_DIR)/oniguruma-dev-$(ONIGURUMA_VERSION)-ipk +ONIGURUMA_DEV_IPK=$(BUILD_DIR)/oniguruma-dev_$(ONIGURUMA_VERSION)-$(ONIGURUMA_IPK_VERSION)_$(TARGET_ARCH).ipk + +.PHONY: oniguruma-source oniguruma-unpack oniguruma oniguruma-stage oniguruma-ipk oniguruma-clean oniguruma-dirclean oniguruma-check + +# +# This is the dependency on the source code. If the source is missing, +# then it will be fetched from the site using wget. +# $(ONIGURUMA_URL) holds the link to the source, +# which is saved to $(DL_DIR)/$(ONIGURUMA_SOURCE). +# When adding new package, remember to place sha512sum of the source to +# scripts/checksums/$(ONIGURUMA_SOURCE).sha512 +# +$(DL_DIR)/$(ONIGURUMA_SOURCE): + $(WGET) -P $(@D) $(ONIGURUMA_URL)/$(@F) || \ + $(WGET) -P $(@D) $(SOURCES_NLO_SITE)/$(@F) + +# +# The source code depends on it existing within the download directory. +# This target will be called by the top level Makefile to download the +# source code's archive (.tar.gz, .bz2, etc.) +# +oniguruma-source: $(DL_DIR)/$(ONIGURUMA_SOURCE) $(ONIGURUMA_PATCHES) + +# +# This target unpacks the source code in the build directory. +# If the source archive is not .tar.gz or .tar.bz2, then you will need +# to change the commands here. Patches to the source code are also +# applied in this target as required. +# +# This target also configures the build within the build directory. +# Flags such as LDFLAGS and CPPFLAGS should be passed into configure +# and NOT $(MAKE) below. Passing it to configure causes configure to +# correctly BUILD the Makefile with the right paths, where passing it +# to Make causes it to override the default search paths of the compiler. +# +# If the compilation of the package requires other packages to be staged +# first, then do that first (e.g. "$(MAKE) -stage -stage"). +# +# If the package uses GNU libtool, you should invoke $(PATCH_LIBTOOL) as +# shown below to make various patches to it. +# +$(ONIGURUMA_BUILD_DIR)/.configured: $(DL_DIR)/$(ONIGURUMA_SOURCE) $(ONIGURUMA_PATCHES) make/oniguruma.mk +# $(MAKE) -stage -stage + rm -rf $(BUILD_DIR)/$(ONIGURUMA_DIR) $(@D) + $(ONIGURUMA_UNZIP) $(DL_DIR)/$(ONIGURUMA_SOURCE) | tar -C $(BUILD_DIR) -xvf - + if test -n "$(ONIGURUMA_PATCHES)" ; \ + then cat $(ONIGURUMA_PATCHES) | \ + $(PATCH) -d $(BUILD_DIR)/$(ONIGURUMA_DIR) -p0 ; \ + fi + if test "$(BUILD_DIR)/$(ONIGURUMA_DIR)" != "$(@D)" ; \ + then mv $(BUILD_DIR)/$(ONIGURUMA_DIR) $(@D) ; \ + fi + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + CPPFLAGS="$(STAGING_CPPFLAGS) $(ONIGURUMA_CPPFLAGS)" \ + LDFLAGS="$(STAGING_LDFLAGS) $(ONIGURUMA_LDFLAGS)" \ + ./configure \ + --build=$(GNU_HOST_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --target=$(GNU_TARGET_NAME) \ + --prefix=$(TARGET_PREFIX) \ + --disable-static \ + ) + $(PATCH_LIBTOOL) $(@D)/libtool + touch $@ + +oniguruma-unpack: $(ONIGURUMA_BUILD_DIR)/.configured + +# +# This builds the actual binary. +# +$(ONIGURUMA_BUILD_DIR)/.built: $(ONIGURUMA_BUILD_DIR)/.configured + rm -f $@ + $(MAKE) -C $(@D) + touch $@ + +# +# This is the build convenience target. +# +oniguruma: $(ONIGURUMA_BUILD_DIR)/.built + +# +# If you are building a library, then you need to stage it too. +# +$(ONIGURUMA_BUILD_DIR)/.staged: $(ONIGURUMA_BUILD_DIR)/.built + rm -f $@ + $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install + rm -f $(STAGING_LIB_DIR)/libonig.la + sed -i -e 's|$(TARGET_PREFIX)|$(STAGING_PREFIX)|' $(STAGING_LIB_DIR)/pkgconfig/oniguruma.pc + touch $@ + +oniguruma-stage: $(ONIGURUMA_BUILD_DIR)/.staged + +# +# This rule creates a control file for ipkg. It is no longer +# necessary to create a seperate control file under sources/oniguruma +# +$(ONIGURUMA_IPK_DIR)/CONTROL/control: + @$(INSTALL) -d $(@D) + @rm -f $@ + @echo "Package: oniguruma" >>$@ + @echo "Architecture: $(TARGET_ARCH)" >>$@ + @echo "Priority: $(ONIGURUMA_PRIORITY)" >>$@ + @echo "Section: $(ONIGURUMA_SECTION)" >>$@ + @echo "Version: $(ONIGURUMA_VERSION)-$(ONIGURUMA_IPK_VERSION)" >>$@ + @echo "Maintainer: $(ONIGURUMA_MAINTAINER)" >>$@ + @echo "Source: $(ONIGURUMA_URL)" >>$@ + @echo "Description: $(ONIGURUMA_DESCRIPTION)" >>$@ + @echo "Depends: $(ONIGURUMA_DEPENDS)" >>$@ + @echo "Suggests: $(ONIGURUMA_SUGGESTS)" >>$@ + @echo "Conflicts: $(ONIGURUMA_CONFLICTS)" >>$@ + +$(ONIGURUMA_DEV_IPK_DIR)/CONTROL/control: + @$(INSTALL) -d $(@D) + @rm -f $@ + @echo "Package: oniguruma-dev" >>$@ + @echo "Architecture: $(TARGET_ARCH)" >>$@ + @echo "Priority: $(ONIGURUMA_PRIORITY)" >>$@ + @echo "Section: $(ONIGURUMA_SECTION)" >>$@ + @echo "Version: $(ONIGURUMA_VERSION)-$(ONIGURUMA_IPK_VERSION)" >>$@ + @echo "Maintainer: $(ONIGURUMA_MAINTAINER)" >>$@ + @echo "Source: $(ONIGURUMA_URL)" >>$@ + @echo "Description: Development files for oniguruma" >>$@ + @echo "Depends: oniguruma" >>$@ + @echo "Suggests: $(ONIGURUMA_SUGGESTS)" >>$@ + @echo "Conflicts: $(ONIGURUMA_CONFLICTS)" >>$@ + +# +# This builds the IPK file. +# +# Binaries should be installed into $(ONIGURUMA_IPK_DIR)$(TARGET_PREFIX)/sbin or $(ONIGURUMA_IPK_DIR)$(TARGET_PREFIX)/bin +# (use the location in a well-known Linux distro as a guide for choosing sbin or bin). +# Libraries and include files should be installed into $(ONIGURUMA_IPK_DIR)$(TARGET_PREFIX)/{lib,include} +# Configuration files should be installed in $(ONIGURUMA_IPK_DIR)$(TARGET_PREFIX)/etc/oniguruma/... +# Documentation files should be installed in $(ONIGURUMA_IPK_DIR)$(TARGET_PREFIX)/doc/oniguruma/... +# Daemon startup scripts should be installed in $(ONIGURUMA_IPK_DIR)$(TARGET_PREFIX)/etc/init.d/S??oniguruma +# +# You may need to patch your application to make it use these locations. +# +$(ONIGURUMA_IPK) $(ONIGURUMA_DEV_IPK): $(ONIGURUMA_BUILD_DIR)/.built + rm -rf $(ONIGURUMA_IPK_DIR) $(BUILD_DIR)/oniguruma_*_$(TARGET_ARCH).ipk \ + $(ONIGURUMA_DEV_IPK_DIR) $(BUILD_DIR)/oniguruma-dev_*_$(TARGET_ARCH).ipk + $(MAKE) -C $(ONIGURUMA_BUILD_DIR) DESTDIR=$(ONIGURUMA_IPK_DIR) install-strip + $(MAKE) -C $(ONIGURUMA_BUILD_DIR) DESTDIR=$(ONIGURUMA_DEV_IPK_DIR) install-strip + rm -fr $(ONIGURUMA_IPK_DIR)$(TARGET_PREFIX)/bin \ + $(ONIGURUMA_IPK_DIR)$(TARGET_PREFIX)/include \ + $(ONIGURUMA_IPK_DIR)$(TARGET_PREFIX)/lib/pkgconfig \ + $(ONIGURUMA_IPK_DIR)$(TARGET_PREFIX)/lib/*.la + rm -fr $(ONIGURUMA_DEV_IPK_DIR)$(TARGET_PREFIX)/lib/libonig.so* \ + $(ONIGURUMA_DEV_IPK_DIR)$(TARGET_PREFIX)/lib/*.la + $(MAKE) $(ONIGURUMA_IPK_DIR)/CONTROL/control + $(MAKE) $(ONIGURUMA_DEV_IPK_DIR)/CONTROL/control + cd $(BUILD_DIR); $(IPKG_BUILD) $(ONIGURUMA_IPK_DIR) + cd $(BUILD_DIR); $(IPKG_BUILD) $(ONIGURUMA_DEV_IPK_DIR) + $(WHAT_TO_DO_WITH_IPK_DIR) $(ONIGURUMA_IPK_DIR) $(ONIGURUMA_DEV_IPK_DIR) + +# +# This is called from the top level makefile to create the IPK file. +# +oniguruma-ipk: $(ONIGURUMA_IPK) + +# +# This is called from the top level makefile to clean all of the built files. +# +oniguruma-clean: + rm -f $(ONIGURUMA_BUILD_DIR)/.built + -$(MAKE) -C $(ONIGURUMA_BUILD_DIR) clean + +# +# This is called from the top level makefile to clean all dynamically created +# directories. +# +oniguruma-dirclean: + rm -rf $(BUILD_DIR)/$(ONIGURUMA_DIR) $(ONIGURUMA_BUILD_DIR) \ + $(ONIGURUMA_IPK_DIR) $(ONIGURUMA_IPK) \ + $(ONIGURUMA_DEV_IPK_DIR) $(ONIGURUMA_DEV_IPK) +# +# +# Some sanity check for the package. +# +oniguruma-check: $(ONIGURUMA_IPK) $(ONIGURUMA_DEV_IPK) + perl scripts/optware-check-package.pl --target=$(OPTWARE_TARGET) $^ diff --git a/make/wavpack.mk b/make/wavpack.mk index ac2a338aa..1ab30fd98 100644 --- a/make/wavpack.mk +++ b/make/wavpack.mk @@ -21,9 +21,18 @@ # "NSLU2 Linux" other developers will feel free to edit. # WAVPACK_SITE=http://www.wavpack.com -WAVPACK_VERSION=4.70.0 +WAVPACK_VERSION=5.1.0 WAVPACK_SOURCE=wavpack-$(WAVPACK_VERSION).tar.bz2 WAVPACK_DIR=wavpack-$(WAVPACK_VERSION) + +WAVPACK_GIT=https://github.com/dbry/WavPack.git +WAVPACK_GIT_DATE=20190420 + +ifdef WAVPACK_GIT_DATE + WAVPACK_VERSION:=$(WAVPACK_VERSION)+git$(WAVPACK_GIT_DATE) + WAVPACK_GIT_TREEISH=22977b29c20f55fb27decfb9ad40d531599fa2b1 +endif + WAVPACK_UNZIP=bzcat WAVPACK_MAINTAINER=NSLU2 Linux WAVPACK_DESCRIPTION=WavPack is a completely open audio compression format providing lossless, high-quality lossy, and a unique hybrid compression mode. @@ -40,7 +49,7 @@ WAVPACK_CONFLICTS= # # WAVPACK_IPK_VERSION should be incremented when the ipk changes. # -WAVPACK_IPK_VERSION=2 +WAVPACK_IPK_VERSION=1 # # WAVPACK_CONFFILES should be a list of user-editable files @@ -51,7 +60,6 @@ WAVPACK_IPK_VERSION=2 # which they should be applied to the source code. # #WAVPACK_PATCHES=$(WAVPACK_SOURCE_DIR)/configure.patch - # # If the compilation of the package requires additional # compilation or linking flags, then list them here. @@ -75,6 +83,8 @@ WAVPACK_BUILD_DIR=$(BUILD_DIR)/wavpack WAVPACK_SOURCE_DIR=$(SOURCE_DIR)/wavpack WAVPACK_IPK_DIR=$(BUILD_DIR)/wavpack-$(WAVPACK_VERSION)-ipk WAVPACK_IPK=$(BUILD_DIR)/wavpack_$(WAVPACK_VERSION)-$(WAVPACK_IPK_VERSION)_$(TARGET_ARCH).ipk +WAVPACK_DEV_IPK_DIR=$(BUILD_DIR)/wavpack-dev-$(WAVPACK_VERSION)-ipk +WAVPACK_DEV_IPK=$(BUILD_DIR)/wavpack-dev_$(WAVPACK_VERSION)-$(WAVPACK_IPK_VERSION)_$(TARGET_ARCH).ipk .PHONY: wavpack-source wavpack-unpack wavpack wavpack-stage wavpack-ipk wavpack-clean wavpack-dirclean wavpack-check @@ -82,10 +92,23 @@ WAVPACK_IPK=$(BUILD_DIR)/wavpack_$(WAVPACK_VERSION)-$(WAVPACK_IPK_VERSION)_$(TAR # This is the dependency on the source code. If the source is missing, # then it will be fetched from the site using wget. # +ifdef WAVPACK_GIT_TREEISH +$(DL_DIR)/$(WAVPACK_SOURCE): + (cd $(BUILD_DIR) ; \ + rm -rf wavpack && \ + git clone --bare $(WAVPACK_GIT) wavpack && \ + (cd wavpack && \ + git archive --format=tar --prefix=$(WAVPACK_DIR)/ $(WAVPACK_GIT_TREEISH) | bzip2 > $@) && \ + rm -rf golang ; \ + ) + +else $(DL_DIR)/$(WAVPACK_SOURCE): $(WGET) -P $(@D) $(WAVPACK_SITE)/$(@F) || \ $(WGET) -P $(@D) $(SOURCES_NLO_SITE)/$(@F) +endif + # # The source code depends on it existing within the download directory. # This target will be called by the top level Makefile to download the @@ -124,6 +147,7 @@ endif if test "$(BUILD_DIR)/$(WAVPACK_DIR)" != "$(@D)" ; \ then mv $(BUILD_DIR)/$(WAVPACK_DIR) $(@D) ; \ fi + $(AUTORECONF1.14) -vif $(@D) (cd $(@D); \ $(TARGET_CONFIGURE_OPTS) \ CPPFLAGS="$(STAGING_CPPFLAGS) $(WAVPACK_CPPFLAGS)" \ @@ -163,6 +187,7 @@ $(WAVPACK_BUILD_DIR)/.staged: $(WAVPACK_BUILD_DIR)/.built sed -i -e '/^prefix=/s|=.*|=$(STAGING_PREFIX)|' -e '/^exec_prefix=/d' \ -e '/^prefix=/s/$$/\nexec_prefix=\$${prefix}/' \ $(STAGING_LIB_DIR)/pkgconfig/wavpack.pc + rm $(STAGING_LIB_DIR)/libwavpack.la touch $@ wavpack-stage: $(WAVPACK_BUILD_DIR)/.staged @@ -186,6 +211,21 @@ $(WAVPACK_IPK_DIR)/CONTROL/control: @echo "Suggests: $(WAVPACK_SUGGESTS)" >>$@ @echo "Conflicts: $(WAVPACK_CONFLICTS)" >>$@ +$(WAVPACK_DEV_IPK_DIR)/CONTROL/control: + @$(INSTALL) -d $(@D) + @rm -f $@ + @echo "Package: wavpack-dev" >>$@ + @echo "Architecture: $(TARGET_ARCH)" >>$@ + @echo "Priority: $(WAVPACK_PRIORITY)" >>$@ + @echo "Section: $(WAVPACK_SECTION)" >>$@ + @echo "Version: $(WAVPACK_VERSION)-$(WAVPACK_IPK_VERSION)" >>$@ + @echo "Maintainer: $(WAVPACK_MAINTAINER)" >>$@ + @echo "Source: $(WAVPACK_SITE)/$(WAVPACK_SOURCE)" >>$@ + @echo "Description: Development files for wavpack" >>$@ + @echo "Depends: wavpack" >>$@ + @echo "Suggests: $(WAVPACK_SUGGESTS)" >>$@ + @echo "Conflicts: $(WAVPACK_CONFLICTS)" >>$@ + # # This builds the IPK file. # @@ -199,26 +239,22 @@ $(WAVPACK_IPK_DIR)/CONTROL/control: # You may need to patch your application to make it use these locations. # $(WAVPACK_IPK): $(WAVPACK_BUILD_DIR)/.built - rm -rf $(WAVPACK_IPK_DIR) $(BUILD_DIR)/wavpack_*_$(TARGET_ARCH).ipk + rm -rf $(WAVPACK_IPK_DIR) $(BUILD_DIR)/wavpack_*_$(TARGET_ARCH).ipk \ + $(WAVPACK_DEV_IPK_DIR) $(BUILD_DIR)/wavpack-dev_*_$(TARGET_ARCH).ipk $(MAKE) -C $(WAVPACK_BUILD_DIR) DESTDIR=$(WAVPACK_IPK_DIR) install-strip + rm -f $(WAVPACK_IPK_DIR)$(TARGET_PREFIX)/lib/libwavpack.la sed -i -e '/^exec_prefix=/d' -e '/^prefix=/s/$$/\nexec_prefix=\$${prefix}/' \ $(WAVPACK_IPK_DIR)$(TARGET_PREFIX)/lib/pkgconfig/wavpack.pc -# $(INSTALL) -d $(WAVPACK_IPK_DIR)$(TARGET_PREFIX)/etc/ -# $(INSTALL) -m 644 $(WAVPACK_SOURCE_DIR)/wavpack.conf $(WAVPACK_IPK_DIR)$(TARGET_PREFIX)/etc/wavpack.conf -# $(INSTALL) -d $(WAVPACK_IPK_DIR)$(TARGET_PREFIX)/etc/init.d -# $(INSTALL) -m 755 $(WAVPACK_SOURCE_DIR)/rc.wavpack $(WAVPACK_IPK_DIR)$(TARGET_PREFIX)/etc/init.d/SXXwavpack -# sed -i -e '/^#!/aOPTWARE_TARGET=${OPTWARE_TARGET}' $(WAVPACK_IPK_DIR)$(TARGET_PREFIX)/etc/init.d/SXXwavpack $(MAKE) $(WAVPACK_IPK_DIR)/CONTROL/control -# $(INSTALL) -m 755 $(WAVPACK_SOURCE_DIR)/postinst $(WAVPACK_IPK_DIR)/CONTROL/postinst -# sed -i -e '/^#!/aOPTWARE_TARGET=${OPTWARE_TARGET}' $(WAVPACK_IPK_DIR)/CONTROL/postinst -# $(INSTALL) -m 755 $(WAVPACK_SOURCE_DIR)/prerm $(WAVPACK_IPK_DIR)/CONTROL/prerm -# sed -i -e '/^#!/aOPTWARE_TARGET=${OPTWARE_TARGET}' $(WAVPACK_IPK_DIR)/CONTROL/prerm -# if test -n "$(UPD-ALT_PREFIX)"; then \ - sed -i -e '/^[ ]*update-alternatives /s|update-alternatives|$(UPD-ALT_PREFIX)/bin/&|' \ - $(WAVPACK_IPK_DIR)/CONTROL/postinst $(WAVPACK_IPK_DIR)/CONTROL/prerm; \ - fi echo $(WAVPACK_CONFFILES) | sed -e 's/ /\n/g' > $(WAVPACK_IPK_DIR)/CONTROL/conffiles + $(INSTALL) -d $(WAVPACK_DEV_IPK_DIR)$(TARGET_PREFIX)/lib + mv $(WAVPACK_IPK_DIR)$(TARGET_PREFIX)/include $(WAVPACK_DEV_IPK_DIR)$(TARGET_PREFIX)/ + mv $(WAVPACK_IPK_DIR)$(TARGET_PREFIX)/lib/pkgconfig $(WAVPACK_DEV_IPK_DIR)$(TARGET_PREFIX)/lib/ + mv $(WAVPACK_IPK_DIR)$(TARGET_PREFIX)/lib/libwavpack.so $(WAVPACK_DEV_IPK_DIR)$(TARGET_PREFIX)/lib/ cd $(BUILD_DIR); $(IPKG_BUILD) $(WAVPACK_IPK_DIR) + $(MAKE) $(WAVPACK_DEV_IPK_DIR)/CONTROL/control + cd $(BUILD_DIR); $(IPKG_BUILD) $(WAVPACK_DEV_IPK_DIR) + $(WHAT_TO_DO_WITH_IPK_DIR) $(WAVPACK_IPK_DIR) $(WAVPACK_DEV_IPK_DIR) # # This is called from the top level makefile to create the IPK file.