###########################################################
#
# oxyl
#
###########################################################
# You must replace "oxyl" and "OXYL" with the lower case name and
# upper case name of your new package. Some places below will say
# "Do not change this" - that does not include this global change,
# which must always be done to ensure we have unique names.
#
# OXYL_VERSION, OXYL_SITE and OXYL_SOURCE define
# the upstream location of the source code for the package.
# OXYL_DIR is the directory which is created when the source
# archive is unpacked.
# OXYL_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.
#
OXYL_SITE=http://www.oxyl.de
OXYL_VERSION=2.5.36
OXYL_SOURCE=oxyl-$(OXYL_VERSION).tar.gz
OXYL_DIR=oxyl
OXYL_UNZIP=zcat
OXYL_MAINTAINER=NSLU2 Linux <nslu2-linux@yahoogroups.com>
OXYL_DESCRIPTION=Oxyl is a Mediaplayer for Pinnacle Showcenter and other Syabas Clients. This version is for use with lighttpd
OXYL_SECTION=Multimedia
OXYL_PRIORITY=optional
OXYL_DEPENDS=php, php-gd, php-fcgi, lighttpd
OXYL_SUGGESTS=
OXYL_CONFLICTS=
#
# OXYL_IPK_VERSION should be incremented when the ipk changes.
#
OXYL_IPK_VERSION=1
#
# OXYL_CONFFILES should be a list of user-editable files
OXYL_CONFFILES=/opt/etc/lighttpd/lighttpd.conf
#
# OXYL_PATCHES should list any patches, in the the order in
# which they should be applied to the source code.
#
OXYL_PATCHES=$(OXYL_SOURCE_DIR)/functions.inc.patch \
$(OXYL_SOURCE_DIR)/oxyl_box_check.php.patch
#
# If the compilation of the package requires additional
# compilation or linking flags, then list them here.
#
OXYL_CPPFLAGS=
OXYL_LDFLAGS=
#
# OXYL_BUILD_DIR is the directory in which the build is done.
# OXYL_SOURCE_DIR is the directory which holds all the
# patches and ipkg control files.
# OXYL_IPK_DIR is the directory in which the ipk is built.
# OXYL_IPK is the name of the resulting ipk files.
#
# You should not change any of these variables.
#
OXYL_BUILD_DIR=$(BUILD_DIR)/oxyl
OXYL_SOURCE_DIR=$(SOURCE_DIR)/oxyl
OXYL_IPK_DIR=$(BUILD_DIR)/oxyl-$(OXYL_VERSION)-ipk
OXYL_IPK=$(BUILD_DIR)/oxyl_$(OXYL_VERSION)-$(OXYL_IPK_VERSION)_$(TARGET_ARCH).ipk
.PHONY: oxyl-source oxyl-unpack oxyl oxyl-stage oxyl-ipk oxyl-clean oxyl-dirclean oxyl-check
#
# This is the dependency on the source code. If the source is missing,
# then it will be fetched from the site using wget.
#
$(DL_DIR)/$(OXYL_SOURCE):
$(WGET) -P $(DL_DIR) $(OXYL_SITE)/$(OXYL_SOURCE) || \
$(WGET) -P $(DL_DIR) $(SOURCES_NLO_SITE)/$(OXYL_SOURCE)
#
# 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.)
#
oxyl-source: $(DL_DIR)/$(OXYL_SOURCE) $(OXYL_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) <bar>-stage <baz>-stage").
#
# If the package uses GNU libtool, you should invoke $(PATCH_LIBTOOL) as
# shown below to make various patches to it.
#
$(OXYL_BUILD_DIR)/.configured: $(DL_DIR)/$(OXYL_SOURCE) $(OXYL_PATCHES)
# $(MAKE) <bar>-stage <baz>-stage
rm -rf $(BUILD_DIR)/$(OXYL_DIR) $(OXYL_BUILD_DIR)
$(OXYL_UNZIP) $(DL_DIR)/$(OXYL_SOURCE) | tar -C $(BUILD_DIR) -xvf -
if test -n "$(OXYL_PATCHES)" ; \
then cat $(OXYL_PATCHES) | \
patch -d $(BUILD_DIR)/$(OXYL_DIR) -p0 ; \
fi
if test "$(BUILD_DIR)/$(OXYL_DIR)" != "$(OXYL_BUILD_DIR)" ; \
then mv $(BUILD_DIR)/$(OXYL_DIR) $(OXYL_BUILD_DIR) ; \
fi
# (cd $(OXYL_BUILD_DIR); \
# $(TARGET_CONFIGURE_OPTS) \
# CPPFLAGS="$(STAGING_CPPFLAGS) $(OXYL_CPPFLAGS)" \
# LDFLAGS="$(STAGING_LDFLAGS) $(OXYL_LDFLAGS)" \
# ./configure \
# --build=$(GNU_HOST_NAME) \
# --host=$(GNU_TARGET_NAME) \
# --target=$(GNU_TARGET_NAME) \
# --prefix=/opt \
# --disable-nls \
# --disable-static \
# )
# $(PATCH_LIBTOOL) $(OXYL_BUILD_DIR)/libtool
touch $@
oxyl-unpack: $(OXYL_BUILD_DIR)/.configured
#
# This builds the actual binary.
#
#$(OXYL_BUILD_DIR)/.built: $(OXYL_BUILD_DIR)/.configured
# rm -f $@
# $(MAKE) -C $(OXYL_BUILD_DIR)
# touch $@
#
# This is the build convenience target.
#
oxyl: $(OXYL_BUILD_DIR)/.configured
#
# If you are building a library, then you need to stage it too.
#
#$(OXYL_BUILD_DIR)/.staged: $(OXYL_BUILD_DIR)/.built
# rm -f $@
# $(MAKE) -C $(OXYL_BUILD_DIR) DESTDIR=$(STAGING_DIR) install
# touch $@
#oxyl-stage: $(OXYL_BUILD_DIR)/.staged
#
# This rule creates a control file for ipkg. It is no longer
# necessary to create a seperate control file under sources/oxyl
#
$(OXYL_IPK_DIR)/CONTROL/control:
@install -d $(@D)
@rm -f $@
@echo "Package: oxyl" >>$@
@echo "Architecture: $(TARGET_ARCH)" >>$@
@echo "Priority: $(OXYL_PRIORITY)" >>$@
@echo "Section: $(OXYL_SECTION)" >>$@
@echo "Version: $(OXYL_VERSION)-$(OXYL_IPK_VERSION)" >>$@
@echo "Maintainer: $(OXYL_MAINTAINER)" >>$@
@echo "Source: $(OXYL_SITE)/$(OXYL_SOURCE)" >>$@
@echo "Description: $(OXYL_DESCRIPTION)" >>$@
@echo "Depends: $(OXYL_DEPENDS)" >>$@
@echo "Suggests: $(OXYL_SUGGESTS)" >>$@
@echo "Conflicts: $(OXYL_CONFLICTS)" >>$@
#
# This builds the IPK file.
#
# Binaries should be installed into $(OXYL_IPK_DIR)/opt/sbin or $(OXYL_IPK_DIR)/opt/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 $(OXYL_IPK_DIR)/opt/{lib,include}
# Configuration files should be installed in $(OXYL_IPK_DIR)/opt/etc/oxyl/...
# Documentation files should be installed in $(OXYL_IPK_DIR)/opt/doc/oxyl/...
# Daemon startup scripts should be installed in $(OXYL_IPK_DIR)/opt/etc/init.d/S??oxyl
#
# You may need to patch your application to make it use these locations.
#
$(OXYL_IPK): $(OXYL_BUILD_DIR)/.configured
rm -rf $(OXYL_IPK_DIR) $(BUILD_DIR)/oxyl_*_$(TARGET_ARCH).ipk
# $(MAKE) -C $(OXYL_BUILD_DIR) DESTDIR=$(OXYL_IPK_DIR) install-strip
install -d $(OXYL_IPK_DIR)/opt/share/www/oxyl
cp -a $(OXYL_BUILD_DIR)/* $(OXYL_IPK_DIR)/opt/share/www/oxyl
install -d $(OXYL_IPK_DIR)/opt/etc/lighttpd
install -m 644 $(OXYL_SOURCE_DIR)/lighttpd.conf $(OXYL_IPK_DIR)/opt/etc/lighttpd/lighttpd.conf
install -m 644 $(OXYL_SOURCE_DIR)/lighttpd.conf.oxyl $(OXYL_IPK_DIR)/opt/etc/lighttpd/lighttpd.conf.oxyl
# sed -i -e '/^#!/aOPTWARE_TARGET=${OPTWARE_TARGET}' $(OXYL_IPK_DIR)/opt/etc/init.d/SXXoxyl
$(MAKE) $(OXYL_IPK_DIR)/CONTROL/control
install -m 755 $(OXYL_SOURCE_DIR)/postinst $(OXYL_IPK_DIR)/CONTROL/postinst
sed -i -e '/^#!/aOPTWARE_TARGET=${OPTWARE_TARGET}' $(OXYL_IPK_DIR)/CONTROL/postinst
install -m 755 $(OXYL_SOURCE_DIR)/preinst $(OXYL_IPK_DIR)/CONTROL/preinst
sed -i -e '/^#!/aOPTWARE_TARGET=${OPTWARE_TARGET}' $(OXYL_IPK_DIR)/CONTROL/preinst
echo $(OXYL_CONFFILES) | sed -e 's/ /\n/g' > $(OXYL_IPK_DIR)/CONTROL/conffiles
cd $(BUILD_DIR); $(IPKG_BUILD) $(OXYL_IPK_DIR)
#
# This is called from the top level makefile to create the IPK file.
#
oxyl-ipk: $(OXYL_IPK)
#
# This is called from the top level makefile to clean all of the built files.
#
oxyl-clean:
rm -f $(OXYL_BUILD_DIR)/.built
-$(MAKE) -C $(OXYL_BUILD_DIR) clean
#
# This is called from the top level makefile to clean all dynamically created
# directories.
#
oxyl-dirclean:
rm -rf $(BUILD_DIR)/$(OXYL_DIR) $(OXYL_BUILD_DIR) $(OXYL_IPK_DIR) $(OXYL_IPK)
#
#
# Some sanity check for the package.
#
oxyl-check: $(OXYL_IPK)
perl scripts/optware-check-package.pl --target=$(OPTWARE_TARGET) $(OXYL_IPK)
###########################################################
#
# oxyl-apache
#
###########################################################
# You must replace "oxyl-apache" and "OXYL-APCHE" with the lower case name and
# upper case name of your new package. Some places below will say
# "Do not change this" - that does not include this global change,
# which must always be done to ensure we have unique names.
#
# OXYL-APCHE_VERSION, OXYL-APCHE_SITE and OXYL-APCHE_SOURCE define
# the upstream location of the source code for the package.
# OXYL-APCHE_DIR is the directory which is created when the source
# archive is unpacked.
# OXYL-APCHE_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.
#
OXYL-APCHE_SITE=http://www.oxyl.de
OXYL-APCHE_VERSION=2.5.36
OXYL-APCHE_SOURCE=oxyl-$(OXYL-APCHE_VERSION).tar.gz
OXYL-APCHE_DIR=oxyl
OXYL-APCHE_UNZIP=zcat
OXYL-APCHE_MAINTAINER=NSLU2 Linux <nslu2-linux@yahoogroups.com>
OXYL-APCHE_DESCRIPTION=Oxyl is a Mediaplayer for Pinnacle Showcenter and other Syabas Clients. This version is for use with Apache 2.2
OXYL-APCHE_SECTION=Multimedia
OXYL-APCHE_PRIORITY=optional
OXYL-APCHE_DEPENDS=php, php-gd, apache, php-apache
OXYL-APCHE_SUGGESTS=
OXYL-APCHE_CONFLICTS=
#
# OXYL-APCHE_IPK_VERSION should be incremented when the ipk changes.
#
OXYL-APCHE_IPK_VERSION=1
#
# OXYL-APCHE_CONFFILES should be a list of user-editable files
OXYL-APCHE_CONFFILES=/opt/etc/apache2/extra/oxyl.conf
#
# OXYL-APCHE_PATCHES should list any patches, in the the order in
# which they should be applied to the source code.
#
OXYL-APCHE_PATCHES=$(OXYL-APCHE_SOURCE_DIR)/functions.inc.patch \
#
# If the compilation of the package requires additional
# compilation or linking flags, then list them here.
#
OXYL-APCHE_CPPFLAGS=
OXYL-APCHE_LDFLAGS=
#
# OXYL-APCHE_BUILD_DIR is the directory in which the build is done.
# OXYL-APCHE_SOURCE_DIR is the directory which holds all the
# patches and ipkg control files.
# OXYL-APCHE_IPK_DIR is the directory in which the ipk is built.
# OXYL-APCHE_IPK is the name of the resulting ipk files.
#
# You should not change any of these variables.
#
OXYL-APCHE_BUILD_DIR=$(BUILD_DIR)/oxyl-apache
OXYL-APCHE_SOURCE_DIR=$(SOURCE_DIR)/oxyl-apache
OXYL-APCHE_IPK_DIR=$(BUILD_DIR)/oxyl-apache-$(OXYL-APCHE_VERSION)-ipk
OXYL-APCHE_IPK=$(BUILD_DIR)/oxyl-apache_$(OXYL-APCHE_VERSION)-$(OXYL-APCHE_IPK_VERSION)_$(TARGET_ARCH).ipk
.PHONY: oxyl-apache-source oxyl-apache-unpack oxyl-apache oxyl-apache-stage oxyl-apache-ipk oxyl-apache-clean oxyl-apache-dirclean oxyl-apache-check
#
# This is the dependency on the source code. If the source is missing,
# then it will be fetched from the site using wget.
#
$(DL_DIR)/$(OXYL-APCHE_SOURCE):
$(WGET) -P $(DL_DIR) $(OXYL-APCHE_SITE)/$(OXYL-APCHE_SOURCE) || \
$(WGET) -P $(DL_DIR) $(SOURCES_NLO_SITE)/$(OXYL-APCHE_SOURCE)
#
# 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.)
#
oxyl-apache-source: $(DL_DIR)/$(OXYL-APCHE_SOURCE) $(OXYL-APCHE_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) <bar>-stage <baz>-stage").
#
# If the package uses GNU libtool, you should invoke $(PATCH_LIBTOOL) as
# shown below to make various patches to it.
#
$(OXYL-APCHE_BUILD_DIR)/.configured: $(DL_DIR)/$(OXYL-APCHE_SOURCE) $(OXYL-APCHE_PATCHES)
# $(MAKE) <bar>-stage <baz>-stage
rm -rf $(BUILD_DIR)/$(OXYL-APCHE_DIR) $(OXYL-APCHE_BUILD_DIR)
$(OXYL-APCHE_UNZIP) $(DL_DIR)/$(OXYL-APCHE_SOURCE) | tar -C $(BUILD_DIR) -xvf -
if test -n "$(OXYL-APCHE_PATCHES)" ; \
then cat $(OXYL-APCHE_PATCHES) | \
patch -d $(BUILD_DIR)/$(OXYL-APCHE_DIR) -p0 ; \
fi
if test "$(BUILD_DIR)/$(OXYL-APCHE_DIR)" != "$(OXYL-APCHE_BUILD_DIR)" ; \
then mv $(BUILD_DIR)/$(OXYL-APCHE_DIR) $(OXYL-APCHE_BUILD_DIR) ; \
fi
# (cd $(OXYL-APCHE_BUILD_DIR); \
# $(TARGET_CONFIGURE_OPTS) \
# CPPFLAGS="$(STAGING_CPPFLAGS) $(OXYL-APCHE_CPPFLAGS)" \
# LDFLAGS="$(STAGING_LDFLAGS) $(OXYL-APCHE_LDFLAGS)" \
# ./configure \
# --build=$(GNU_HOST_NAME) \
# --host=$(GNU_TARGET_NAME) \
# --target=$(GNU_TARGET_NAME) \
# --prefix=/opt \
# --disable-nls \
# --disable-static \
# )
# $(PATCH_LIBTOOL) $(OXYL-APCHE_BUILD_DIR)/libtool
touch $@
oxyl-apache-unpack: $(OXYL-APCHE_BUILD_DIR)/.configured
#
# This builds the actual binary.
#
#$(OXYL-APCHE_BUILD_DIR)/.built: $(OXYL-APCHE_BUILD_DIR)/.configured
# rm -f $@
# $(MAKE) -C $(OXYL-APCHE_BUILD_DIR)
# touch $@
#
# This is the build convenience target.
#
oxyl-apache: $(OXYL-APCHE_BUILD_DIR)/.configured
#
# If you are building a library, then you need to stage it too.
#
#$(OXYL-APCHE_BUILD_DIR)/.staged: $(OXYL-APCHE_BUILD_DIR)/.built
# rm -f $@
# $(MAKE) -C $(OXYL-APCHE_BUILD_DIR) DESTDIR=$(STAGING_DIR) install
# touch $@
#oxyl-apache-stage: $(OXYL-APCHE_BUILD_DIR)/.staged
#
# This rule creates a control file for ipkg. It is no longer
# necessary to create a seperate control file under sources/oxyl-apache
#
$(OXYL-APCHE_IPK_DIR)/CONTROL/control:
@install -d $(@D)
@rm -f $@
@echo "Package: oxyl-apache" >>$@
@echo "Architecture: $(TARGET_ARCH)" >>$@
@echo "Priority: $(OXYL-APCHE_PRIORITY)" >>$@
@echo "Section: $(OXYL-APCHE_SECTION)" >>$@
@echo "Version: $(OXYL-APCHE_VERSION)-$(OXYL-APCHE_IPK_VERSION)" >>$@
@echo "Maintainer: $(OXYL-APCHE_MAINTAINER)" >>$@
@echo "Source: $(OXYL-APCHE_SITE)/$(OXYL-APCHE_SOURCE)" >>$@
@echo "Description: $(OXYL-APCHE_DESCRIPTION)" >>$@
@echo "Depends: $(OXYL-APCHE_DEPENDS)" >>$@
@echo "Suggests: $(OXYL-APCHE_SUGGESTS)" >>$@
@echo "Conflicts: $(OXYL-APCHE_CONFLICTS)" >>$@
#
# This builds the IPK file.
#
# Binaries should be installed into $(OXYL-APCHE_IPK_DIR)/opt/sbin or $(OXYL-APCHE_IPK_DIR)/opt/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 $(OXYL-APCHE_IPK_DIR)/opt/{lib,include}
# Configuration files should be installed in $(OXYL-APCHE_IPK_DIR)/opt/etc/oxyl-apache/...
# Documentation files should be installed in $(OXYL-APCHE_IPK_DIR)/opt/doc/oxyl-apache/...
# Daemon startup scripts should be installed in $(OXYL-APCHE_IPK_DIR)/opt/etc/init.d/S??oxyl-apache
#
# You may need to patch your application to make it use these locations.
#
$(OXYL-APCHE_IPK): $(OXYL-APCHE_BUILD_DIR)/.configured
rm -rf $(OXYL-APCHE_IPK_DIR) $(BUILD_DIR)/oxyl-apache_*_$(TARGET_ARCH).ipk
# $(MAKE) -C $(OXYL-APCHE_BUILD_DIR) DESTDIR=$(OXYL-APCHE_IPK_DIR) install-strip
install -d $(OXYL-APCHE_IPK_DIR)/opt/share/www/oxyl-apache
cp -a $(OXYL-APCHE_BUILD_DIR)/* $(OXYL-APCHE_IPK_DIR)/opt/share/www/oxyl-apache
install -d $(OXYL-APCHE_IPK_DIR)/opt/etc/apache2/extra
install -m 644 $(OXYL-APCHE_SOURCE_DIR)/oxyl.conf $(OXYL-APCHE_IPK_DIR)/opt/etc/apache2/extra/oxyl.conf
# sed -i -e '/^#!/aOPTWARE_TARGET=${OPTWARE_TARGET}' $(OXYL-APCHE_IPK_DIR)/opt/etc/init.d/SXXoxyl-apache
$(MAKE) $(OXYL-APCHE_IPK_DIR)/CONTROL/control
install -m 755 $(OXYL-APCHE_SOURCE_DIR)/postinst $(OXYL-APCHE_IPK_DIR)/CONTROL/postinst
sed -i -e '/^#!/aOPTWARE_TARGET=${OPTWARE_TARGET}' $(OXYL-APCHE_IPK_DIR)/CONTROL/postinst
# install -m 755 $(OXYL-APCHE_SOURCE_DIR)/prerm $(OXYL-APCHE_IPK_DIR)/CONTROL/prerm
# sed -i -e '/^#!/aOPTWARE_TARGET=${OPTWARE_TARGET}' $(OXYL-APCHE_IPK_DIR)/CONTROL/prerm
echo $(OXYL-APCHE_CONFFILES) | sed -e 's/ /\n/g' > $(OXYL-APCHE_IPK_DIR)/CONTROL/conffiles
cd $(BUILD_DIR); $(IPKG_BUILD) $(OXYL-APCHE_IPK_DIR)
#
# This is called from the top level makefile to create the IPK file.
#
oxyl-apache-ipk: $(OXYL-APCHE_IPK)
#
# This is called from the top level makefile to clean all of the built files.
#
oxyl-apache-clean:
rm -f $(OXYL-APCHE_BUILD_DIR)/.built
-$(MAKE) -C $(OXYL-APCHE_BUILD_DIR) clean
#
# This is called from the top level makefile to clean all dynamically created
# directories.
#
oxyl-apache-dirclean:
rm -rf $(BUILD_DIR)/$(OXYL-APCHE_DIR) $(OXYL-APCHE_BUILD_DIR) $(OXYL-APCHE_IPK_DIR) $(OXYL-APCHE_IPK)
#
#
# Some sanity check for the package.
#
oxyl-apache-check: $(OXYL-APCHE_IPK)
perl scripts/optware-check-package.pl --target=$(OPTWARE_TARGET) $(OXYL-APCHE_IPK)