From 556bec4312791cee7d58c6ee6d32f34fb1f69d32 Mon Sep 17 00:00:00 2001 From: stalchuk Date: Fri, 18 Jan 2019 14:52:36 +0300 Subject: [PATCH 1/5] Add xmlstarlet package --- checksums/xmlstarlet-1.6.1.tar.gz.sha512 | 1 + make/xmlstarlet.mk | 252 +++++++++++++++++++++++ 2 files changed, 253 insertions(+) create mode 100644 checksums/xmlstarlet-1.6.1.tar.gz.sha512 create mode 100644 make/xmlstarlet.mk diff --git a/checksums/xmlstarlet-1.6.1.tar.gz.sha512 b/checksums/xmlstarlet-1.6.1.tar.gz.sha512 new file mode 100644 index 000000000..8edccf54d --- /dev/null +++ b/checksums/xmlstarlet-1.6.1.tar.gz.sha512 @@ -0,0 +1 @@ +4228df812caec7059d7a76986c4d9a4262bd861cc53dca05f341ae6c062be05f1c39fc637918ab00f60f40587c6c556e3c9bfaf8a18b149e3c321a92214dbe8b diff --git a/make/xmlstarlet.mk b/make/xmlstarlet.mk new file mode 100644 index 000000000..24e21b483 --- /dev/null +++ b/make/xmlstarlet.mk @@ -0,0 +1,252 @@ +########################################################### +# +# xmlstarlet +# +########################################################### +# +# XMLSTARLET_VERSION, XMLSTARLET_SITE and XMLSTARLET_SOURCE define +# the upstream location of the source code for the package. +# XMLSTARLET_DIR is the directory which is created when the source +# archive is unpacked. +# XMLSTARLET_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. +# +XMLSTARLET_URL=https://downloads.sourceforge.net/project/xmlstar/xmlstarlet/$(XMLSTARLET_VERSION)/xmlstarlet-$(XMLSTARLET_VERSION).tar.gz +XMLSTARLET_VERSION=1.6.1 +XMLSTARLET_SOURCE=xmlstarlet-$(XMLSTARLET_VERSION).tar.gz +XMLSTARLET_DIR=xmlstarlet-$(XMLSTARLET_VERSION) +XMLSTARLET_UNZIP=zcat +XMLSTARLET_MAINTAINER=NSLU2 Linux +XMLSTARLET_DESCRIPTION=A set of tools to transform, query, validate, and edit XML documents. +XMLSTARLET_SECTION=util +XMLSTARLET_PRIORITY=optional +XMLSTARLET_DEPENDS=libxml2, libxslt +ifeq (libiconv, $(filter libiconv, $(PACKAGES))) +XMLSTARLET_DEPENDS+=, libiconv +endif +XMLSTARLET_SUGGESTS= +XMLSTARLET_CONFLICTS= + +# +# XMLSTARLET_IPK_VERSION should be incremented when the ipk changes. +# +XMLSTARLET_IPK_VERSION=1 + +# +# XMLSTARLET_CONFFILES should be a list of user-editable files +#XMLSTARLET_CONFFILES=$(TARGET_PREFIX)/etc/xmlstarlet.conf $(TARGET_PREFIX)/etc/init.d/SXXxmlstarlet + +# +# XMLSTARLET_PATCHES should list any patches, in the the order in +# which they should be applied to the source code. +# +#XMLSTARLET_PATCHES=$(XMLSTARLET_SOURCE_DIR)/configure.patch + +# +# If the compilation of the package requires additional +# compilation or linking flags, then list them here. +# +XMLSTARLET_CPPFLAGS= +XMLSTARLET_LDFLAGS= + +ifeq (libiconv, $(filter libiconv, $(PACKAGES))) +XMLSTARLET_ARGS+= --with-libiconv-prefix=$(STAGING_PREFIX) +endif + +# +# XMLSTARLET_BUILD_DIR is the directory in which the build is done. +# XMLSTARLET_SOURCE_DIR is the directory which holds all the +# patches and ipkg control files. +# XMLSTARLET_IPK_DIR is the directory in which the ipk is built. +# XMLSTARLET_IPK is the name of the resulting ipk files. +# +# You should not change any of these variables. +# +XMLSTARLET_BUILD_DIR=$(BUILD_DIR)/xmlstarlet +XMLSTARLET_SOURCE_DIR=$(SOURCE_DIR)/xmlstarlet +XMLSTARLET_IPK_DIR=$(BUILD_DIR)/xmlstarlet-$(XMLSTARLET_VERSION)-ipk +XMLSTARLET_IPK=$(BUILD_DIR)/xmlstarlet_$(XMLSTARLET_VERSION)-$(XMLSTARLET_IPK_VERSION)_$(TARGET_ARCH).ipk + +.PHONY: xmlstarlet-source xmlstarlet-unpack xmlstarlet xmlstarlet-stage xmlstarlet-ipk xmlstarlet-clean xmlstarlet-dirclean xmlstarlet-check + +# +# This is the dependency on the source code. If the source is missing, +# then it will be fetched from the site using wget. +# $(XMLSTARLET_URL) holds the link to the source, +# which is saved to $(DL_DIR)/$(XMLSTARLET_SOURCE). +# When adding new package, remember to place sha512sum of the source to +# scripts/checksums/$(XMLSTARLET_SOURCE).sha512 +# +$(DL_DIR)/$(XMLSTARLET_SOURCE): + $(WGET) -O $@ $(XMLSTARLET_URL) || \ + $(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.) +# +xmlstarlet-source: $(DL_DIR)/$(XMLSTARLET_SOURCE) $(XMLSTARLET_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. +# +$(XMLSTARLET_BUILD_DIR)/.configured: $(DL_DIR)/$(XMLSTARLET_SOURCE) $(XMLSTARLET_PATCHES) make/xmlstarlet.mk + $(MAKE) libxml2-stage libxslt-stage +ifeq (libiconv, $(filter libiconv, $(PACKAGES))) + $(MAKE) libiconv-stage +endif + rm -rf $(BUILD_DIR)/$(XMLSTARLET_DIR) $(@D) + $(XMLSTARLET_UNZIP) $(DL_DIR)/$(XMLSTARLET_SOURCE) | tar -C $(BUILD_DIR) -xvf - + if test -n "$(XMLSTARLET_PATCHES)" ; \ + then cat $(XMLSTARLET_PATCHES) | \ + $(PATCH) -d $(BUILD_DIR)/$(XMLSTARLET_DIR) -p0 ; \ + fi + if test "$(BUILD_DIR)/$(XMLSTARLET_DIR)" != "$(@D)" ; \ + then mv $(BUILD_DIR)/$(XMLSTARLET_DIR) $(@D) ; \ + fi + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + CPPFLAGS="$(STAGING_CPPFLAGS) $(XMLSTARLET_CPPFLAGS)" \ + LDFLAGS="$(STAGING_LDFLAGS) $(XMLSTARLET_LDFLAGS)" \ + ac_cv_func_malloc_0_nonnull=yes \ + ac_cv_func_realloc_0_nonnull=yes \ + ./configure \ + --build=$(GNU_HOST_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --target=$(GNU_TARGET_NAME) \ + --prefix=$(TARGET_PREFIX) \ + --disable-static \ + --disable-nls \ + --with-libxml-prefix=$(STAGING_PREFIX) \ + --with-libxslt-prefix=$(STAGING_PREFIX) \ + $(XMLSTARLET_ARGS) \ + ) +# $(PATCH_LIBTOOL) $(@D)/libtool + touch $@ + +xmlstarlet-unpack: $(XMLSTARLET_BUILD_DIR)/.configured + +# +# This builds the actual binary. +# +$(XMLSTARLET_BUILD_DIR)/.built: $(XMLSTARLET_BUILD_DIR)/.configured + rm -f $@ + $(MAKE) -C $(@D) + touch $@ + +# +# This is the build convenience target. +# +xmlstarlet: $(XMLSTARLET_BUILD_DIR)/.built + +# +# If you are building a library, then you need to stage it too. +# +$(XMLSTARLET_BUILD_DIR)/.staged: $(XMLSTARLET_BUILD_DIR)/.built + rm -f $@ + $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install + touch $@ + +xmlstarlet-stage: $(XMLSTARLET_BUILD_DIR)/.staged + +# +# This rule creates a control file for ipkg. It is no longer +# necessary to create a seperate control file under sources/xmlstarlet +# +$(XMLSTARLET_IPK_DIR)/CONTROL/control: + @$(INSTALL) -d $(@D) + @rm -f $@ + @echo "Package: xmlstarlet" >>$@ + @echo "Architecture: $(TARGET_ARCH)" >>$@ + @echo "Priority: $(XMLSTARLET_PRIORITY)" >>$@ + @echo "Section: $(XMLSTARLET_SECTION)" >>$@ + @echo "Version: $(XMLSTARLET_VERSION)-$(XMLSTARLET_IPK_VERSION)" >>$@ + @echo "Maintainer: $(XMLSTARLET_MAINTAINER)" >>$@ + @echo "Source: $(XMLSTARLET_URL)" >>$@ + @echo "Description: $(XMLSTARLET_DESCRIPTION)" >>$@ + @echo "Depends: $(XMLSTARLET_DEPENDS)" >>$@ + @echo "Suggests: $(XMLSTARLET_SUGGESTS)" >>$@ + @echo "Conflicts: $(XMLSTARLET_CONFLICTS)" >>$@ + +# +# This builds the IPK file. +# +# Binaries should be installed into $(XMLSTARLET_IPK_DIR)$(TARGET_PREFIX)/sbin or $(XMLSTARLET_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 $(XMLSTARLET_IPK_DIR)$(TARGET_PREFIX)/{lib,include} +# Configuration files should be installed in $(XMLSTARLET_IPK_DIR)$(TARGET_PREFIX)/etc/xmlstarlet/... +# Documentation files should be installed in $(XMLSTARLET_IPK_DIR)$(TARGET_PREFIX)/doc/xmlstarlet/... +# Daemon startup scripts should be installed in $(XMLSTARLET_IPK_DIR)$(TARGET_PREFIX)/etc/init.d/S??xmlstarlet +# +# You may need to patch your application to make it use these locations. +# +$(XMLSTARLET_IPK): $(XMLSTARLET_BUILD_DIR)/.built + rm -rf $(XMLSTARLET_IPK_DIR) $(BUILD_DIR)/xmlstarlet_*_$(TARGET_ARCH).ipk + $(MAKE) -C $(XMLSTARLET_BUILD_DIR) DESTDIR=$(XMLSTARLET_IPK_DIR) install-strip +# $(INSTALL) -d $(XMLSTARLET_IPK_DIR)$(TARGET_PREFIX)/etc/ +# $(INSTALL) -m 644 $(XMLSTARLET_SOURCE_DIR)/xmlstarlet.conf $(XMLSTARLET_IPK_DIR)$(TARGET_PREFIX)/etc/xmlstarlet.conf +# $(INSTALL) -d $(XMLSTARLET_IPK_DIR)$(TARGET_PREFIX)/etc/init.d +# $(INSTALL) -m 755 $(XMLSTARLET_SOURCE_DIR)/rc.xmlstarlet $(XMLSTARLET_IPK_DIR)$(TARGET_PREFIX)/etc/init.d/SXXxmlstarlet +# sed -i -e '/^#!/aOPTWARE_TARGET=${OPTWARE_TARGET}' $(XMLSTARLET_IPK_DIR)$(TARGET_PREFIX)/etc/init.d/SXXxmlstarlet + $(MAKE) $(XMLSTARLET_IPK_DIR)/CONTROL/control +# $(INSTALL) -m 755 $(XMLSTARLET_SOURCE_DIR)/postinst $(XMLSTARLET_IPK_DIR)/CONTROL/postinst +# sed -i -e '/^#!/aOPTWARE_TARGET=${OPTWARE_TARGET}' $(XMLSTARLET_IPK_DIR)/CONTROL/postinst +# $(INSTALL) -m 755 $(XMLSTARLET_SOURCE_DIR)/prerm $(XMLSTARLET_IPK_DIR)/CONTROL/prerm +# sed -i -e '/^#!/aOPTWARE_TARGET=${OPTWARE_TARGET}' $(XMLSTARLET_IPK_DIR)/CONTROL/prerm +# if test -n "$(UPD-ALT_PREFIX)"; then \ + sed -i -e '/^[ ]*update-alternatives /s|update-alternatives|$(UPD-ALT_PREFIX)/bin/&|' \ + $(XMLSTARLET_IPK_DIR)/CONTROL/postinst $(XMLSTARLET_IPK_DIR)/CONTROL/prerm; \ + fi + echo $(XMLSTARLET_CONFFILES) | sed -e 's/ /\n/g' > $(XMLSTARLET_IPK_DIR)/CONTROL/conffiles + cd $(BUILD_DIR); $(IPKG_BUILD) $(XMLSTARLET_IPK_DIR) + $(WHAT_TO_DO_WITH_IPK_DIR) $(XMLSTARLET_IPK_DIR) + +# +# This is called from the top level makefile to create the IPK file. +# +xmlstarlet-ipk: $(XMLSTARLET_IPK) + +# +# This is called from the top level makefile to clean all of the built files. +# +xmlstarlet-clean: + rm -f $(XMLSTARLET_BUILD_DIR)/.built + -$(MAKE) -C $(XMLSTARLET_BUILD_DIR) clean + +# +# This is called from the top level makefile to clean all dynamically created +# directories. +# +xmlstarlet-dirclean: + rm -rf $(BUILD_DIR)/$(XMLSTARLET_DIR) $(XMLSTARLET_BUILD_DIR) $(XMLSTARLET_IPK_DIR) $(XMLSTARLET_IPK) +# +# +# Some sanity check for the package. +# +xmlstarlet-check: $(XMLSTARLET_IPK) + perl scripts/optware-check-package.pl --target=$(OPTWARE_TARGET) $^ From 79dcad515e8f83548499117bdf8f47773b6119c0 Mon Sep 17 00:00:00 2001 From: stalchuk Date: Tue, 22 Jan 2019 13:09:57 +0300 Subject: [PATCH 2/5] Update XMLSTARLET_URL --- make/xmlstarlet.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make/xmlstarlet.mk b/make/xmlstarlet.mk index 24e21b483..4b511c08c 100644 --- a/make/xmlstarlet.mk +++ b/make/xmlstarlet.mk @@ -20,7 +20,7 @@ # from your name or email address. If you leave MAINTAINER set to # "NSLU2 Linux" other developers will feel free to edit. # -XMLSTARLET_URL=https://downloads.sourceforge.net/project/xmlstar/xmlstarlet/$(XMLSTARLET_VERSION)/xmlstarlet-$(XMLSTARLET_VERSION).tar.gz +XMLSTARLET_URL=https://sourceforge.net/projects/xmlstar/files/xmlstarlet/$(XMLSTARLET_VERSION)/xmlstarlet-$(XMLSTARLET_VERSION).tar.gz/download XMLSTARLET_VERSION=1.6.1 XMLSTARLET_SOURCE=xmlstarlet-$(XMLSTARLET_VERSION).tar.gz XMLSTARLET_DIR=xmlstarlet-$(XMLSTARLET_VERSION) From 70f34dcddcdf87250aea7389909140cfbdac3d54 Mon Sep 17 00:00:00 2001 From: stalchuk Date: Tue, 16 Apr 2019 16:01:09 +0300 Subject: [PATCH 3/5] Add new packages: -jq -oniguruma --- checksums/jq-1.6.tar.gz.sha512 | 1 + checksums/onig-6.9.1.tar.gz.sha512 | 1 + make/jq.mk | 252 +++++++++++++++++++++++++++++ make/oniguruma.mk | 251 ++++++++++++++++++++++++++++ 4 files changed, 505 insertions(+) create mode 100644 checksums/jq-1.6.tar.gz.sha512 create mode 100644 checksums/onig-6.9.1.tar.gz.sha512 create mode 100644 make/jq.mk create mode 100644 make/oniguruma.mk 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..0afe260b3 --- /dev/null +++ b/make/oniguruma.mk @@ -0,0 +1,251 @@ +########################################################### +# +# 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 + 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) $^ From 2fbb0539861d04cc5c28ee930c0ab51162f6cc5b Mon Sep 17 00:00:00 2001 From: stalchuk Date: Thu, 10 Oct 2019 11:09:52 +0300 Subject: [PATCH 4/5] Proper libonig staging --- make/oniguruma.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/make/oniguruma.mk b/make/oniguruma.mk index 0afe260b3..901a2a1ab 100644 --- a/make/oniguruma.mk +++ b/make/oniguruma.mk @@ -156,6 +156,8 @@ oniguruma: $(ONIGURUMA_BUILD_DIR)/.built $(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 From 12552df86aab5ee4034251ee56034390b049b777 Mon Sep 17 00:00:00 2001 From: stalchuk Date: Wed, 16 Oct 2019 10:48:55 +0300 Subject: [PATCH 5/5] wavpack v4.70.0 -> v5.1.0+git20190420 --- make/wavpack.mk | 70 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 53 insertions(+), 17 deletions(-) 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.