Commit 7bc15cda authored by Christopher Huhn's avatar Christopher Huhn
Browse files

Packaging from dh-make-pecl

parent b894582d
php-oci8 for Debian
--------------------------
This extension has been created with dh-make-pecl which is part
of dh-make-php.
-- Christopher Huhn, GSI <C.Huhn@gsi.de>, Wed, 22 Feb 2017 13:38:24 +0100
php-oci8 (2.1.3-1) unstable; urgency=low
* Initial Release (Closes: #<ITP bug number>).
-- Christopher Huhn, GSI <C.Huhn@gsi.de> Wed, 22 Feb 2017 13:38:24 +0100
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:util="urn:xslt:functions:util" xmlns:func="http://exslt.org/functions" xmlns:str="http://exslt.org/strings" extension-element-prefixes="func str">
<xsl:output method="text"/>
<func:function name="util:maximize">
<xsl:param name="string"/>
<xsl:param name="line-length"/>
<func:result>
<xsl:variable name="tmp" select="string-length(substring-before($string,' '))"/>
<xsl:choose>
<xsl:when test="($tmp &gt; $line-length) or (not(contains($string, ' ')))">0</xsl:when>
<xsl:when test="(substring($string,$line-length,1) = ' ')">
<xsl:value-of select="$line-length"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="util:maximize(substring-after($string, ' '), $line-length - $tmp - 1) + 1 + $tmp"/>
</xsl:otherwise>
</xsl:choose>
</func:result>
</func:function>
<func:function name="util:format">
<xsl:param name="string"/>
<xsl:param name="indent" select="2"/>
<xsl:param name="line-length" select="76"/>
<func:result>
<xsl:choose>
<xsl:when test="contains($string,'&#xA;') or contains($string,'&#xD;')">
<xsl:for-each select="str:tokenize($string,'&#xA;&#xD;')">
<xsl:value-of select="util:format(., $indent, $line-length)"/>
</xsl:for-each>
</xsl:when>
<xsl:when test="string-length($string) &gt; $line-length">
<xsl:variable name="tmp" select="util:maximize($string, $line-length)"/>
<xsl:value-of select="str:padding($indent,' ')"/>
<xsl:value-of select="substring($string, 1, $tmp)"/>
<xsl:text>&#xA;</xsl:text>
<xsl:value-of select="util:format(substring($string, $tmp + 1))"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="str:padding($indent,' ')"/>
<xsl:value-of select="$string"/>
<xsl:text>&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</func:result>
</func:function>
<func:function name="util:norm">
<xsl:param name="num"/>
<xsl:param name="length" select="4"/>
<xsl:choose>
<xsl:when test="$length &gt; string-length($num)">
<func:result select="concat('0',util:norm($num, $length - 1))"/>
</xsl:when>
<xsl:otherwise>
<func:result select="$num"/>
</xsl:otherwise>
</xsl:choose>
</func:function>
<func:function name="util:extractnum">
<xsl:param name="string"/>
<xsl:choose>
<xsl:when test="$string = ''">
<func:result select="0"/>
</xsl:when>
<xsl:when test="$string &lt;= '9' and $string &gt;= '0'">
<func:result select="$string"/>
</xsl:when>
<xsl:otherwise>
<func:result select="util:extractnum(substring($string,1,string-length($string)-1))"/>
</xsl:otherwise>
</xsl:choose>
</func:function>
<func:function name="util:ver2num">
<xsl:param name="version"/>
<xsl:choose>
<xsl:when test="contains($version,'.')">
<func:result select="concat(util:norm(substring-before($version,'.')), util:ver2num(substring-after($version,'.')))"/>
</xsl:when>
<xsl:when test="$version = number($version)">
<func:result select="concat(util:norm($version), util:norm(0))"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="tmp" select="util:extractnum($version)"/>
<func:result select="concat(util:norm($tmp),' ', substring($version, string-length($tmp) + 1))"/>
</xsl:otherwise>
</xsl:choose>
</func:function>
<xsl:template match="package">
<xsl:apply-templates select="release">
<xsl:sort order="descending" select="util:ver2num(normalize-space(version))" data-type="text"/>
</xsl:apply-templates>
<xsl:apply-templates select="changelog/release">
<xsl:sort order="descending" select="util:ver2num(normalize-space(version))" data-type="text"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="release">
<xsl:text>Version </xsl:text>
<xsl:value-of select="version"/>
<xsl:text> - </xsl:text>
<xsl:value-of select="date"/>
<xsl:if test="state">
<xsl:text> (</xsl:text>
<xsl:value-of select="state"/>
<xsl:text>)</xsl:text>
</xsl:if>
<xsl:text>&#xA;----------------------------------------&#xA;Notes:&#xA;</xsl:text>
<xsl:value-of select="util:format(notes)"/>
<xsl:text>&#xA;</xsl:text>
</xsl:template>
</xsl:stylesheet>
Source: php-oci8
Section: web
Priority: optional
Maintainer: Christopher Huhn, GSI <C.Huhn@gsi.de>
Build-Depends: debhelper (>= 7), po-debconf, xsltproc , php5-dev
Standards-Version: 3.9.1
Package: php5-oci8
Architecture: any
Depends: ${shlibs:Depends}, ${php:Depends}, ${misc:Depends}
Description: oci8 module for PHP 5
Extension for Oracle Database
.
Use the OCI8 extension to access Oracle Database. Use 'pecl install
oci8' to install for PHP 7. Use 'pecl install oci8-2.0.12' to
install for PHP 5.2 - PHP 5.6. Use 'pecl install oci8-1.4.10'
to install for PHP 4.3.9 - PHP 5.1. The OCI8 extension
can be linked with Oracle client libraries from Oracle
Database 12.1, 11, or 10.2. These libraries are found in your
database installation, or in the free Oracle Instant Client from
http://www.oracle.com/technetwork/database/features/instant-client/.
Oracle's standard cross-version connectivity applies. For example,
PHP OCI8 linked with Instant Client 11.2 can connect to Oracle
Database 9.2 onward. See Oracle's note "Oracle Client / Server
Interoperability Support" (ID 207303.1) for details.
This package was debianized by Christopher Huhn, GSI <C.Huhn@gsi.de> using dh-make-pecl
on Wed, 22 Feb 2017 13:38:24 +0100.
It was downloaded from http://pecl.php.net/package/oci8
Upstream Author(s):
Christopher Jones, Antony Dovgal, Wez Furlong, Andi Gutmans
Copyright:
Copyright (C) 2016 Christopher Jones, Antony Dovgal, Wez Furlong, Andi Gutmans
License:
Array
The Debian packaging is copyright 2009, Christopher Huhn, GSI <C.Huhn@gsi.de> and
is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
oci8-2.1.3/README
oci8-2.1.3/CREDITS
; configuration for php oci8 module
; priority=20
extension=oci8.so
modules/oci8.so
#!/bin/sh
set -e
[ "$1" = "configure" ] && php5enmod oci8
#DEBHELPER#
exit 0
#!/usr/bin/make -f
# template debian/rules provided by dh-make-php.
# GNU copyright 2005 by Uwe Steinmann.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This has to be exported to make some magic below work.
export DH_OPTIONS
CFLAGS = -O2 -Wall
CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
DEBUG := --enable-debug
else
DEBUG := --disable-debug
endif
TAR=tar
PECL_PKG_NAME=oci8
PECL_PKG_REALNAME=oci8
PECL_PKG_VERSION=2.1.3
PACKAGE_NAME=php-oci8
BIN_PACKAGE_NAME=php$*-oci8
PHPIZE=/usr/bin/phpize
PHPCONFIG=/usr/bin/php-config
EXT_DIR=$(shell $(PHPCONFIG)$* --extension-dir)
SOURCE_DIR=$(shell ls -d $(PECL_PKG_REALNAME)-*)
BINARYTARGETS=binary-arch-v5
BUILDTARGETS=build-v5
CLEANTARGETS=clean-v5
PHP55CONFD=true
# Sarge doesn't support --phpapi option (Bug #365667)
phpapiver4=$(shell /usr/bin/php-config4 --phpapi)
#phpapiver4=$(/usr/bin/php-config4 --extension-dir | xargs basename)
phpapiver5=$(shell /usr/bin/php-config5 --phpapi)
configure-v4 configure-v5: configure-v%: configure-stamp-v%
configure-stamp-v4 configure-stamp-v5: configure-stamp-v%:
dh_testdir
# Add here commands to configure the package.
(cd $(SOURCE_DIR); \
$(PHPIZE)$*; \
./configure --with-php-config=$(PHPCONFIG)$* --prefix=/usr)
# rm -f configure-stamp-v*
touch $@
build: $(BUILDTARGETS)
build-v4 build-v5: build-v%: build-stamp-v%
build-stamp:
# xsltproc --nonet --novalid debian/changelog.xsl package.xml > debian/Changelog
$(shell /usr/share/dh-make-php/phppkginfo . changelog > debian/Changelog)
touch build-stamp
build-stamp-v4 build-stamp-v5: build-stamp-v%: build-stamp configure-stamp-v%
dh_testdir
# Add here commands to compile the package.
(cd $(SOURCE_DIR); $(MAKE); mkdir -p ../tmp/modules$*; cp modules/* ../tmp/modules$*; $(MAKE) clean)
# rm -f build-stamp-v*
touch $@
clean: $(CLEANTARGETS)
dh_clean
clean-v4 clean-v5: clean-v%:
dh_testdir
dh_testroot
rm -f build-stamp* configure-stamp*
# Add here commands to clean up after the build process.
(cd $(SOURCE_DIR); \
$(MAKE) clean; \
$(PHPIZE)$* --clean)
rm -rf tmp/modules$*
install-v4 install-v5: install-v%: build-v%
dh_testdir
dh_testroot
# can't dh_clean here without specifically excluding the possibly existing installed dirs
# for other version.
#dh_clean -k
dh_installdirs
# dh_pecl
# Add here commands to install the package into debian/$(PACKAGE_NAME).
# $(MAKE) INSTALL_ROOT=$(CURDIR)/debian/$(PACKAGE_NAME) install
# sh -c 'VERSION=`egrep "#define ZEND_MODULE_API_NO" \
# /usr/include/php4/Zend/zend_modules.h \
# | sed "s/#define ZEND_MODULE_API_NO //"`; \
# chmod 644 debian/$(PACKAGE_NAME)/usr/lib/php4/$$VERSION/*.so'
mkdir -p debian/$(BIN_PACKAGE_NAME)/$(EXT_DIR)
install -m 644 -o root -g root tmp/modules$*/$(PECL_PKG_NAME).so debian/$(BIN_PACKAGE_NAME)/$(EXT_DIR)/$(PECL_PKG_NAME).so
if [ -f "debian/$(PECL_PKG_NAME).ini" ]; then \
if [ "$(PHP55CONFD)" = "true" ]; then \
mkdir -p debian/$(BIN_PACKAGE_NAME)/etc/php$*/mods-available; \
cp debian/$(PECL_PKG_NAME).ini debian/$(BIN_PACKAGE_NAME)/etc/php$*/mods-available; \
else \
mkdir -p debian/$(BIN_PACKAGE_NAME)/etc/php$*/conf.d; \
cp debian/$(PECL_PKG_NAME).ini debian/$(BIN_PACKAGE_NAME)/etc/php$*/conf.d; \
fi \
fi
# Build architecture-independent files here.
binary-indep:
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch-v4 binary-arch-v5: binary-arch-v%: install-v%
echo "php:Depends=phpapi-$(phpapiver$*)" >> debian/$(BIN_PACKAGE_NAME).substvars
binary-arch: $(BINARYTARGETS)
dh_testdir
dh_testroot
dh_installchangelogs debian/Changelog
dh_installdocs
dh_installexamples
# dh_install --sourcedir=debian/$(BIN_PACKAGE_NAME)
# dh_installmenu
dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
# dh_installcron
# dh_installinfo
# dh_installman
# dh_link
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
dh_strip
endif
dh_compress
dh_fixperms
# dh_perl
# dh_python
# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build build-v4 build-v5 clean clean-v4 clean-v5 binary-indep binary-arch binary-arch-v4 binary-arch-v5 binary install-v4 install-v5 configure-v4 configure-v5
version=3
http://pecl.php.net/package/oci8 \
/get/oci8-([\d\.]*).tgz debian uupdate
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment