Radix cross Linux

Radix Linux distribution for embedded systems.

637 Commits   4 Branches   3 Tags
author: Andrey V.Kosteltsev <kx@radix.pro> 2016-10-20 22:32:51 +0000 committer: Andrey V.Kosteltsev <kx@radix.pro> 2016-10-20 22:32:51 +0000 commit: eec02d9c721a9ffa39c916f52fc0e6975574f63c parent: ff16f8ed6a7ebbab3d43cf5b474be7c1c1ba1b62
Commit Summary:
Zapping VBI library
Diffstat:
7 files changed, 460 insertions, 0 deletions
diff --git a/libs/zvbi/0.2.35-x86_32/Makefile b/libs/zvbi/0.2.35-x86_32/Makefile
new file mode 100644
index 000000000..7c9bcc2b3
--- /dev/null
+++ b/libs/zvbi/0.2.35-x86_32/Makefile
@@ -0,0 +1,187 @@
+
+COMPONENT_TARGETS  = $(HARDWARE_PC64)
+
+NEED_ABS_PATH      = true
+COMPONENT_IS_3PP   = true
+
+CREATE_X86_32_PACKAGE = true
+
+
+include ../../../build-system/constants.mk
+
+
+SOURCE_REQUIRES    = sources/packages/m/zvbi
+
+REQUIRES           = libs/zvbi/0.2.35
+REQUIRES          += libs/libpng/libpng14/1.4.19-x86_32
+REQUIRES          += X11/X.org/lib/libX11/1.6.3-x86_32
+
+# ======= __END_OF_REQUIRES__ =======
+
+
+version            = 0.2.35
+tar_bz2_archive    = $(SRC_PACKAGE_PATH)/packages/m/zvbi/zvbi-$(version).tar.bz2
+SRC_ARCHIVE        = $(tar_bz2_archive)
+SRC_DIR            = $(TARGET_BUILD_DIR)/zvbi-$(version)
+src_dir_name       = zvbi-$(version)
+src_done           = $(TARGET_BUILD_DIR)/.source_done
+
+PATCHES = PATCHES
+
+build_target       = $(TARGET_BUILD_DIR)/.build_done
+install_target     = $(TARGET_BUILD_DIR)/.install_done
+
+
+####### Targets
+
+PKG_GROUP = libs
+
+#
+# *PKG_NAME & *PKG_VERSION shouldn't be a reference to value.
+#
+ZVBI_32_PKG_NAME                = zvbi-x32
+ZVBI_32_PKG_VERSION             = 0.2.35
+ZVBI_32_PKG_ARCH                = $(TOOLCHAIN)
+ZVBI_32_PKG_DISTRO_NAME         = $(DISTRO_NAME)
+ZVBI_32_PKG_DISTRO_VERSION      = $(DISTRO_VERSION)
+ZVBI_32_PKG_GROUP               = $(PKG_GROUP)
+###                              |---handy-ruler-------------------------------|
+ZVBI_32_PKG_SHORT_DESCRIPTION   = The Zapping VBI library
+ZVBI_32_PKG_URL                 = $(BUG_URL)
+ZVBI_32_PKG_LICENSE             = GPLv2
+ZVBI_32_PKG_DESCRIPTION_FILE    = $(TARGET_BUILD_DIR)/$(ZVBI_32_PKG_NAME)-pkg-description
+ZVBI_32_PKG_DESCRIPTION_FILE_IN = $(ZVBI_32_PKG_NAME)-pkg-description.in
+ZVBI_32_PKG_INSTALL_SCRIPT      = $(ZVBI_32_PKG_NAME)-pkg-install.sh
+
+ZVBI_32_PKG       = $(CURDIR)/$(TARGET_BUILD_DIR)/$(ZVBI_32_PKG_NAME)-package
+
+pkg_basename      = $(ZVBI_32_PKG_NAME)-$(ZVBI_32_PKG_VERSION)-$(ZVBI_32_PKG_ARCH)-$(ZVBI_32_PKG_DISTRO_NAME)-$(ZVBI_32_PKG_DISTRO_VERSION)
+
+pkg_archive       = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
+pkg_signature     = $(call sign-name,$(pkg_archive))
+pkg_description   = $(call desc-name,$(pkg_archive))
+products          = $(call pkg-files,$(pkg_archive))
+
+BUILD_TARGETS     = $(build_target)
+BUILD_TARGETS    += $(install_target)
+
+PRODUCT_TARGETS   = $(products)
+
+ROOTFS_TARGETS    = $(pkg_archive)
+
+
+include ../../../build-system/core.mk
+
+
+env_sysroot  = DESTDIR=$(ZVBI_32_PKG)
+
+
+extra_configure_switches  = --libdir=/usr/lib$(MULTILIB_X86_32_SUFFIX)
+extra_configure_switches += --mandir=/usr/share/man
+extra_configure_switches += --disable-dependency-tracking
+
+extra_configure_switches += --sysconfdir=/etc
+
+extra_configure_switches += --bindir=/usr/bin/32
+extra_configure_switches += --sbindir=/usr/sbin/32
+
+extra_configure_switches += --with-pic
+
+extra_configure_switches += --enable-static=yes
+extra_configure_switches += --enable-shared=yes
+
+
+CFLAGS += -Wno-aggressive-loop-optimizations
+
+
+TARGET_BIN_RPATH = /lib$(MULTILIB_X86_32_SUFFIX):/usr/lib$(MULTILIB_X86_32_SUFFIX)
+TARGET_LIB_RPATH = /lib$(MULTILIB_X86_32_SUFFIX):/usr/lib$(MULTILIB_X86_32_SUFFIX):/usr/lib/../lib$(MULTILIB_X86_32_SUFFIX)
+
+LDFLAGS += -Wl,-rpath,$(TARGET_LIB_RPATH)
+
+
+####### Dependencies
+
+$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
+	$(UNPACK_SRC_ARCHIVE)
+	$(APPLY_PATCHES)
+	@touch $@
+
+$(build_target): $(src_done)
+	@cd $(SRC_DIR) && \
+	  $(BUILD_ENVIRONMENT) ../$(src_dir_name)/configure \
+	  --prefix=/usr               \
+	  --build=$(BUILD)            \
+	  --host=$(TARGET32)          \
+	  $(extra_configure_switches)
+	@cd $(SRC_DIR) && $(BUILD_ENVIRONMENT) $(MAKE)
+	@touch $@
+
+$(install_target): $(build_target)
+	@mkdir -p $(ZVBI_32_PKG)
+	@cd $(SRC_DIR) && $(BUILD_ENVIRONMENT) $(MAKE) -j1 install $(env_sysroot)
+	@rm -rf $(ZVBI_32_PKG)/usr/include
+	@rm -rf $(ZVBI_32_PKG)/usr/share
+	# ======= remove toolchain path from target libtool *.la files =======
+	@( cd $(ZVBI_32_PKG)/usr/lib$(MULTILIB_X86_32_SUFFIX) ; \
+	   sed -i "s,$(TARGET_DEST_DIR),,g" libzvbi-chains.la libzvbi.la ; \
+	 )
+	# ======= Install the same to $(TARGET_DEST_DIR) =======
+	$(call install-into-devenv, $(ZVBI_32_PKG))
+	# ======= tune libtool *.la search path to the target destination for development =======
+	@( cd $(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX) ; \
+	   sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" libzvbi-chains.la libzvbi.la ; \
+	   sed -i "s,L/lib,L$(TARGET_DEST_DIR)/lib,g" libzvbi-chains.la libzvbi.la ; \
+	 )
+	# ======= tune pkg-config *.pc search path to the target destination for development =======
+	@( cd $(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/pkgconfig ; \
+	   sed -i "s,=/usr,=$(TARGET_DEST_DIR)/usr,g" zvbi-?.?.pc ; \
+	 )
+	# ======= Strip binaries =======
+	@( cd $(ZVBI_32_PKG) ; \
+	   find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+	   find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+	   find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs $(STRIP) -g 2> /dev/null \
+	 )
+ifneq ($(CHRPATH),)
+	# ======= Set RPATH/RUNPATH for target binaries =======
+	@( cd $(ZVBI_32_PKG)/usr ; \
+	   for file in `find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
+	     rpath=`$(CHRPATH) -l $$file 2> /dev/null | grep "R*PATH"` ; \
+	     if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
+	       $(CHRPATH) -r $(TARGET_BIN_RPATH) $$file 1> /dev/null 2> /dev/null ; \
+	     fi ; \
+	   done ; \
+	 )
+	# ======= Set RPATH/RUNPATH for target shared objects =======
+	@( cd $(ZVBI_32_PKG)/usr/lib$(MULTILIB_X86_32_SUFFIX) ; \
+	   for file in `find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
+	     rpath=`$(CHRPATH) -l $$file 2> /dev/null | grep "R*PATH"` ; \
+	     if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
+	       $(CHRPATH) -r $(TARGET_LIB_RPATH) $$file 1> /dev/null 2> /dev/null ; \
+	     fi ; \
+	   done ; \
+	 )
+endif
+	@touch $@
+
+$(ZVBI_32_PKG_DESCRIPTION_FILE): $(ZVBI_32_PKG_DESCRIPTION_FILE_IN)
+	@cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
+
+$(pkg_signature)   : $(pkg_archive) ;
+$(pkg_description) : $(pkg_archive) ;
+
+$(pkg_archive): $(install_target) $(ZVBI_32_PKG_DESCRIPTION_FILE) $(ZVBI_32_PKG_INSTALL_SCRIPT)
+	@cp $(ZVBI_32_PKG_DESCRIPTION_FILE) $(ZVBI_32_PKG)/.DESCRIPTION
+	@cp $(ZVBI_32_PKG_INSTALL_SCRIPT) $(ZVBI_32_PKG)/.INSTALL
+	@$(BUILD_PKG_REQUIRES) $(ZVBI_32_PKG)/.REQUIRES
+	@echo "pkgname=$(ZVBI_32_PKG_NAME)"                            >  $(ZVBI_32_PKG)/.PKGINFO ; \
+	 echo "pkgver=$(ZVBI_32_PKG_VERSION)"                          >> $(ZVBI_32_PKG)/.PKGINFO ; \
+	 echo "arch=$(ZVBI_32_PKG_ARCH)"                               >> $(ZVBI_32_PKG)/.PKGINFO ; \
+	 echo "distroname=$(ZVBI_32_PKG_DISTRO_NAME)"                  >> $(ZVBI_32_PKG)/.PKGINFO ; \
+	 echo "distrover=$(ZVBI_32_PKG_DISTRO_VERSION)"                >> $(ZVBI_32_PKG)/.PKGINFO ; \
+	 echo "group=$(ZVBI_32_PKG_GROUP)"                             >> $(ZVBI_32_PKG)/.PKGINFO ; \
+	 echo "short_description=\"$(ZVBI_32_PKG_SHORT_DESCRIPTION)\"" >> $(ZVBI_32_PKG)/.PKGINFO ; \
+	 echo "url=$(ZVBI_32_PKG_URL)"                                 >> $(ZVBI_32_PKG)/.PKGINFO ; \
+	 echo "license=$(ZVBI_32_PKG_LICENSE)"                         >> $(ZVBI_32_PKG)/.PKGINFO
+	@$(FAKEROOT) sh -c "cd $(ZVBI_32_PKG) && chown -R root:root . && $(MAKE_PACKAGE) --linkadd yes .."
diff --git a/libs/zvbi/0.2.35-x86_32/PATCHES b/libs/zvbi/0.2.35-x86_32/PATCHES
new file mode 100644
index 000000000..e69de29bb
diff --git a/libs/zvbi/0.2.35-x86_32/zvbi-x32-pkg-description.in b/libs/zvbi/0.2.35-x86_32/zvbi-x32-pkg-description.in
new file mode 100644
index 000000000..b32a1a806
--- /dev/null
+++ b/libs/zvbi/0.2.35-x86_32/zvbi-x32-pkg-description.in
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.  Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in.  You must
+# make exactly 11 lines for the formatting to be correct.  It's also
+# customary to leave one space after the ':'.
+
+        |-----handy-ruler------------------------------------------------------|
+zvbi-x32: zvbi-x32 @VERSION@ (x86_32 Zapping VBI library)
+zvbi-x32:
+zvbi-x32: The Zapping VBI library, in short ZVBI, provides functions to
+zvbi-x32: capture and decode VBI data. It is written in plain ANSI C with few
+zvbi-x32: dependencies on other tools and libraries, licensed under GPL.
+zvbi-x32:
+zvbi-x32:
+zvbi-x32: Homepage: http://zapping.sourceforge.net/ZVBI
+zvbi-x32:
+zvbi-x32:
+zvbi-x32:
diff --git a/libs/zvbi/0.2.35-x86_32/zvbi-x32-pkg-install.sh b/libs/zvbi/0.2.35-x86_32/zvbi-x32-pkg-install.sh
new file mode 100755
index 000000000..8e8683cd6
--- /dev/null
+++ b/libs/zvbi/0.2.35-x86_32/zvbi-x32-pkg-install.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# arg 1:  the new package version
+pre_install() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+post_install() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+# arg 2:  the old package version
+pre_update() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+# arg 2:  the old package version
+post_update() {
+  post_install
+}
+
+# arg 1:  the old package version
+pre_remove() {
+  /bin/true
+}
+
+# arg 1:  the old package version
+post_remove() {
+  /bin/true
+}
+
+
+operation=$1
+shift
+
+$operation $*
diff --git a/libs/zvbi/0.2.35/Makefile b/libs/zvbi/0.2.35/Makefile
new file mode 100644
index 000000000..8dc9f511c
--- /dev/null
+++ b/libs/zvbi/0.2.35/Makefile
@@ -0,0 +1,228 @@
+
+COMPONENT_TARGETS  = $(HARDWARE_PC32)
+COMPONENT_TARGETS += $(HARDWARE_PC64)
+COMPONENT_TARGETS += $(HARDWARE_CB1X)
+COMPONENT_TARGETS += $(HARDWARE_CB2X)
+COMPONENT_TARGETS += $(HARDWARE_CB3X)
+COMPONENT_TARGETS += $(HARDWARE_FFRK3288)
+COMPONENT_TARGETS += $(HARDWARE_M201)
+COMPONENT_TARGETS += $(HARDWARE_MXQ)
+COMPONENT_TARGETS += $(HARDWARE_NIT6Q)
+COMPONENT_TARGETS += $(HARDWARE_OMAP5UEVM)
+COMPONENT_TARGETS += $(HARDWARE_DRA7XXEVM)
+COMPONENT_TARGETS += $(HARDWARE_CI20)
+COMPONENT_TARGETS += $(HARDWARE_BT1)
+
+
+NEED_ABS_PATH      = true
+COMPONENT_IS_3PP   = true
+
+
+include ../../../build-system/constants.mk
+
+
+SOURCE_REQUIRES    = sources/packages/m/zvbi
+
+REQUIRES           = libs/libpng/libpng14/1.4.19
+REQUIRES          += X11/X.org/lib/libX11/1.6.3
+
+# ======= __END_OF_REQUIRES__ =======
+
+
+version            = 0.2.35
+tar_bz2_archive    = $(SRC_PACKAGE_PATH)/packages/m/zvbi/zvbi-$(version).tar.bz2
+SRC_ARCHIVE        = $(tar_bz2_archive)
+SRC_DIR            = $(TARGET_BUILD_DIR)/zvbi-$(version)
+src_dir_name       = zvbi-$(version)
+src_done           = $(TARGET_BUILD_DIR)/.source_done
+
+PATCHES = PATCHES
+
+build_target       = $(TARGET_BUILD_DIR)/.build_done
+install_target     = $(TARGET_BUILD_DIR)/.install_done
+
+
+####### Targets
+
+PKG_GROUP = libs
+
+#
+# *PKG_NAME & *PKG_VERSION shouldn't be a reference to value.
+#
+ZVBI_PKG_NAME                = zvbi
+ZVBI_PKG_VERSION             = 0.2.35
+ZVBI_PKG_ARCH                = $(TOOLCHAIN)
+ZVBI_PKG_DISTRO_NAME         = $(DISTRO_NAME)
+ZVBI_PKG_DISTRO_VERSION      = $(DISTRO_VERSION)
+ZVBI_PKG_GROUP               = $(PKG_GROUP)
+###                           |---handy-ruler-------------------------------|
+ZVBI_PKG_SHORT_DESCRIPTION   = The Zapping VBI library
+ZVBI_PKG_URL                 = $(BUG_URL)
+ZVBI_PKG_LICENSE             = GPLv2
+ZVBI_PKG_DESCRIPTION_FILE    = $(TARGET_BUILD_DIR)/$(ZVBI_PKG_NAME)-pkg-description
+ZVBI_PKG_DESCRIPTION_FILE_IN = $(ZVBI_PKG_NAME)-pkg-description.in
+ZVBI_PKG_INSTALL_SCRIPT      = $(ZVBI_PKG_NAME)-pkg-install.sh
+
+ZVBI_PKG         = $(CURDIR)/$(TARGET_BUILD_DIR)/$(ZVBI_PKG_NAME)-package
+
+pkg_basename     = $(ZVBI_PKG_NAME)-$(ZVBI_PKG_VERSION)-$(ZVBI_PKG_ARCH)-$(ZVBI_PKG_DISTRO_NAME)-$(ZVBI_PKG_DISTRO_VERSION)
+
+pkg_archive      = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
+pkg_signature    = $(call sign-name,$(pkg_archive))
+pkg_description  = $(call desc-name,$(pkg_archive))
+products         = $(call pkg-files,$(pkg_archive))
+
+BUILD_TARGETS    = $(build_target)
+BUILD_TARGETS   += $(install_target)
+
+PRODUCT_TARGETS  = $(products)
+
+ROOTFS_TARGETS   = $(pkg_archive)
+
+
+include ../../../build-system/core.mk
+
+
+env_sysroot = DESTDIR=$(ZVBI_PKG)
+
+
+extra_configure_switches  = --libdir=/usr/lib$(LIBSUFFIX)
+extra_configure_switches += --mandir=/usr/share/man
+extra_configure_switches += --disable-dependency-tracking
+
+extra_configure_switches += --sysconfdir=/etc
+
+extra_configure_switches += --sbindir=/usr/sbin
+
+extra_configure_switches += --enable-v4l
+extra_configure_switches += --enable-dvb
+
+extra_configure_switches += --with-pic
+extra_configure_switches += --with-x
+
+extra_configure_switches += --enable-static=yes
+extra_configure_switches += --enable-shared=yes
+
+
+CFLAGS += -Wno-aggressive-loop-optimizations
+
+
+TARGET_BIN_RPATH = /lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX)
+TARGET_LIB_RPATH = /lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX):/usr/lib/../lib$(LIBSUFFIX)
+
+LDFLAGS += -Wl,-rpath,$(TARGET_LIB_RPATH)
+
+
+####### Dependencies
+
+$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
+	$(UNPACK_SRC_ARCHIVE)
+	$(APPLY_PATCHES)
+	@touch $@
+
+$(build_target): $(src_done)
+	@cd $(SRC_DIR) && \
+	  $(BUILD_ENVIRONMENT) ../$(src_dir_name)/configure \
+	  --prefix=/usr               \
+	  --build=$(BUILD)            \
+	  --host=$(TARGET)            \
+	  $(extra_configure_switches)
+	@cd $(SRC_DIR) && $(BUILD_ENVIRONMENT) $(MAKE)
+	@touch $@
+
+$(install_target): $(build_target)
+	@mkdir -p $(ZVBI_PKG)
+	@cd $(SRC_DIR) && $(BUILD_ENVIRONMENT) $(MAKE) -j1 install $(env_sysroot)
+	# ======= Install Documentation =======
+	@if [ -d $(ZVBI_PKG)/usr/share/man ]; then \
+	  ( cd $(ZVBI_PKG)/usr/share/man ; \
+	    for manpagedir in `find . -type d -name "man*"` ; do \
+	      ( cd $$manpagedir ; \
+	        for eachpage in `find . -type l -maxdepth 1` ; do \
+	          ln -s `readlink $$eachpage`.gz $$eachpage.gz ; \
+	          rm $$eachpage ; \
+	        done ; \
+	        gzip -9 *.?  ; \
+	      ) \
+	    done \
+	  ) \
+	 fi
+	@mkdir -p $(ZVBI_PKG)/usr/doc/$(src_dir_name)
+	@cp -a $(SRC_DIR)/AUTHORS $(SRC_DIR)/COPYING* \
+	       $(ZVBI_PKG)/usr/doc/$(src_dir_name)
+	@mkdir -p $(ZVBI_PKG)/usr/share/doc/$(src_dir_name)
+	@( cd $(SRC_DIR) ; \
+	   cp -a AUTHORS COPYING* INSTALL NEWS README TODO \
+	         doc/html \
+	         $(ZVBI_PKG)/usr/share/doc/$(src_dir_name) ; \
+	 )
+	@( cd $(SRC_DIR) ; \
+	   if [ -r ChangeLog ]; then \
+	     DOCSDIR=`echo $(ZVBI_PKG)/usr/share/doc/$(src_dir_name)` ; \
+	     cat ChangeLog | head -n 1000 > $$DOCSDIR/ChangeLog ; \
+	     touch -r ChangeLog $$DOCSDIR/ChangeLog ; \
+	   fi \
+	 )
+	# ======= remove toolchain path from target libtool *.la files =======
+	@( cd $(ZVBI_PKG)/usr/lib$(LIBSUFFIX) ; \
+	   sed -i "s,$(TARGET_DEST_DIR),,g" libzvbi-chains.la libzvbi.la ; \
+	 )
+	# ======= Install the same to $(TARGET_DEST_DIR) =======
+	$(call install-into-devenv, $(ZVBI_PKG))
+	# ======= tune libtool *.la search path to the target destination for development =======
+	@( cd $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX) ; \
+	  sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" libzvbi-chains.la libzvbi.la ; \
+	  sed -i "s,L/lib,L$(TARGET_DEST_DIR)/lib,g" libzvbi-chains.la libzvbi.la ; \
+	 )
+	# ======= tune pkg-config *.pc search path to the target destination for development =======
+	@( cd $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/pkgconfig ; \
+	   sed -i "s,=/usr,=$(TARGET_DEST_DIR)/usr,g" zvbi-?.?.pc ; \
+	 )
+	# ======= Strip binaries =======
+	@( cd $(ZVBI_PKG) ; \
+	   find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+	   find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+	   find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs $(STRIP) -g 2> /dev/null \
+	 )
+ifneq ($(CHRPATH),)
+	# ======= Set RPATH/RUNPATH for target binaries =======
+	@( cd $(ZVBI_PKG)/usr ; \
+	   for file in `find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
+	     rpath=`$(CHRPATH) -l $$file 2> /dev/null | grep "R*PATH"` ; \
+	     if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
+	       $(CHRPATH) -r $(TARGET_BIN_RPATH) $$file 1> /dev/null 2> /dev/null ; \
+	     fi ; \
+	   done ; \
+	 )
+	# ======= Set RPATH/RUNPATH for target shared objects =======
+	@( cd $(ZVBI_PKG)/usr/lib$(LIBSUFFIX) ; \
+	   for file in `find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
+	     rpath=`$(CHRPATH) -l $$file 2> /dev/null | grep "R*PATH"` ; \
+	     if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
+	       $(CHRPATH) -r $(TARGET_LIB_RPATH) $$file 1> /dev/null 2> /dev/null ; \
+	     fi ; \
+	   done ; \
+	 )
+endif
+	@touch $@
+
+$(ZVBI_PKG_DESCRIPTION_FILE): $(ZVBI_PKG_DESCRIPTION_FILE_IN)
+	@cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
+
+$(pkg_signature)   : $(pkg_archive) ;
+$(pkg_description) : $(pkg_archive) ;
+
+$(pkg_archive): $(install_target) $(ZVBI_PKG_DESCRIPTION_FILE) $(ZVBI_PKG_INSTALL_SCRIPT)
+	@cp $(ZVBI_PKG_DESCRIPTION_FILE) $(ZVBI_PKG)/.DESCRIPTION
+	@cp $(ZVBI_PKG_INSTALL_SCRIPT) $(ZVBI_PKG)/.INSTALL
+	@$(BUILD_PKG_REQUIRES) $(ZVBI_PKG)/.REQUIRES
+	@echo "pkgname=$(ZVBI_PKG_NAME)"                            >  $(ZVBI_PKG)/.PKGINFO ; \
+	 echo "pkgver=$(ZVBI_PKG_VERSION)"                          >> $(ZVBI_PKG)/.PKGINFO ; \
+	 echo "arch=$(ZVBI_PKG_ARCH)"                               >> $(ZVBI_PKG)/.PKGINFO ; \
+	 echo "distroname=$(ZVBI_PKG_DISTRO_NAME)"                  >> $(ZVBI_PKG)/.PKGINFO ; \
+	 echo "distrover=$(ZVBI_PKG_DISTRO_VERSION)"                >> $(ZVBI_PKG)/.PKGINFO ; \
+	 echo "group=$(ZVBI_PKG_GROUP)"                             >> $(ZVBI_PKG)/.PKGINFO ; \
+	 echo "short_description=\"$(ZVBI_PKG_SHORT_DESCRIPTION)\"" >> $(ZVBI_PKG)/.PKGINFO ; \
+	 echo "url=$(ZVBI_PKG_URL)"                                 >> $(ZVBI_PKG)/.PKGINFO ; \
+	 echo "license=$(ZVBI_PKG_LICENSE)"                         >> $(ZVBI_PKG)/.PKGINFO
+	@$(FAKEROOT) sh -c "cd $(ZVBI_PKG) && chown -R root:root . && $(MAKE_PACKAGE) --linkadd yes .."
diff --git a/libs/zvbi/0.2.35/PATCHES b/libs/zvbi/0.2.35/PATCHES
new file mode 100644
index 000000000..e69de29bb
diff --git a/libs/zvbi/0.2.35/zvbi-pkg-description.in b/libs/zvbi/0.2.35/zvbi-pkg-description.in
new file mode 100644
index 000000000..6ef1acfa8
--- /dev/null
+++ b/libs/zvbi/0.2.35/zvbi-pkg-description.in
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.  Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in.  You must
+# make exactly 11 lines for the formatting to be correct.  It's also
+# customary to leave one space after the ':'.
+
+    |-----handy-ruler------------------------------------------------------|
+zvbi: zvbi @VERSION@ (The Zapping VBI library)
+zvbi:
+zvbi: The Zapping VBI library, in short ZVBI, provides functions to
+zvbi: capture and decode VBI data. It is written in plain ANSI C with few
+zvbi: dependencies on other tools and libraries, licensed under GPL.
+zvbi:
+zvbi:
+zvbi: Homepage: http://zapping.sourceforge.net/ZVBI
+zvbi:
+zvbi:
+zvbi:
diff --git a/libs/zvbi/0.2.35/zvbi-pkg-install.sh b/libs/zvbi/0.2.35/zvbi-pkg-install.sh
new file mode 100755
index 000000000..b44c4e648
--- /dev/null
+++ b/libs/zvbi/0.2.35/zvbi-pkg-install.sh
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+# Preserve new files
+install_file() {
+  NEW="$1"
+  OLD="`dirname $NEW`/`basename $NEW .new`"
+  # If there's no file by that name, mv it over:
+  if [ ! -r $OLD ]; then
+    mv $NEW $OLD
+  elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+    rm $NEW
+  fi
+  # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+
+# arg 1:  the new package version
+pre_install() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+post_install() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+# arg 2:  the old package version
+pre_update() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+# arg 2:  the old package version
+post_update() {
+  post_install
+}
+
+# arg 1:  the old package version
+pre_remove() {
+  /bin/true
+}
+
+# arg 1:  the old package version
+post_remove() {
+  /bin/true
+}
+
+
+operation=$1
+shift
+
+$operation $*
diff --git a/sources/packages/m/zvbi/Makefile b/sources/packages/m/zvbi/Makefile
new file mode 100644
index 000000000..464a375d0
--- /dev/null
+++ b/sources/packages/m/zvbi/Makefile
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/m/zvbi
+
+versions    = 0.2.35
+pkgname     = zvbi
+suffix      = tar.bz2
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) -i & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) -i & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)