Skip to content

Commit f7a40fb

Browse files
author
Simon Effenberg
committed
added a debian/ directory to build phpredis easy with svn-buildpackage/dpkg-buildpackage
1 parent 40bc4a9 commit f7a40fb

File tree

7 files changed

+262
-0
lines changed

7 files changed

+262
-0
lines changed

debian/changelog

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
phpredis (1.0.0-2) unstable; urgency=low
2+
3+
* Fix some little debian/* problems.
4+
5+
-- Simon Effenberg <[email protected]> Thu, 23 Sep 2010 11:50:59 +0200
6+
7+
phpredis (1.0.0-1) unstable; urgency=low
8+
9+
* Initial release.
10+
11+
-- Simon Effenberg <[email protected]> Wed, 22 Sep 2010 16:04:53 +0200

debian/compat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7

debian/control

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Source: phpredis
2+
Section: web
3+
Priority: optional
4+
Maintainer: Nicolas Favre-Felix <[email protected]>
5+
Build-Depends: debhelper (>= 7), php5-dev
6+
Standards-Version: 3.8.0
7+
Homepage: http://github.com/owlient/phpredis
8+
9+
Package: phpredis
10+
Architecture: any
11+
Depends: ${shlibs:Depends}, ${misc:Depends}, ${php5:Depends}
12+
Recommends: php5
13+
Description: Redis C extension for PHP5.

debian/copyright

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
This package was debianized by:
2+
3+
Simon Effenberg <[email protected]> on Mon, 22 Sep 2010 14:24:03 +0100
4+
5+
It was downloaded from:
6+
7+
http://github.com/owlient/phpredis
8+
9+
Upstream Author(s):
10+
11+
Alfonso Jimenez <[email protected]>
12+
Nasreddine Bouafif <[email protected]>
13+
Nicolas Favre-Felix <[email protected]>
14+
15+
Copyright:
16+
17+
<Copyright (C) YYYY Firtname Lastname>
18+
<likewise for another author>
19+
20+
License:
21+
22+
### SELECT: ###
23+
This package is free software; you can redistribute it and/or modify
24+
it under the terms of the GNU General Public License as published by
25+
the Free Software Foundation; either version 2 of the License, or
26+
(at your option) any later version.
27+
### OR ###
28+
This package is free software; you can redistribute it and/or modify
29+
it under the terms of the GNU General Public License version 2 as
30+
published by the Free Software Foundation.
31+
##########
32+
33+
This package is distributed in the hope that it will be useful,
34+
but WITHOUT ANY WARRANTY; without even the implied warranty of
35+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36+
GNU General Public License for more details.
37+
38+
You should have received a copy of the GNU General Public License
39+
along with this package; if not, write to the Free Software
40+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
41+
42+
On Debian systems, the complete text of the GNU General
43+
Public License can be found in `/usr/share/common-licenses/GPL'.
44+
45+
The Debian packaging is:
46+
47+
Copyright C) 2010, Simon Effenberg <[email protected]>
48+
49+
and is licensed under the GPL, see above.
50+
51+
52+
# Please also look if there are files or directories which have a
53+
# different copyright/license attached and list them here.
54+

debian/postinst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/sh
2+
# postinst script for phpredis
3+
#
4+
# see: dh_installdeb(1)
5+
6+
set -e
7+
8+
# summary of how this script can be called:
9+
# * <postinst> `configure' <most-recently-configured-version>
10+
# * <old-postinst> `abort-upgrade' <new version>
11+
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
12+
# <new-version>
13+
# * <postinst> `abort-remove'
14+
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
15+
# <failed-install-package> <version> `removing'
16+
# <conflicting-package> <version>
17+
# for details, see http://www.debian.org/doc/debian-policy/ or
18+
# the debian-policy package
19+
20+
case "$1" in
21+
configure)
22+
cat > /etc/php5/conf.d/redis.ini <<EOF
23+
; uncomment the next line to enable the module
24+
extension=redis.so
25+
EOF
26+
;;
27+
28+
abort-upgrade|abort-remove|abort-deconfigure)
29+
;;
30+
31+
*)
32+
echo "postinst called with unknown argument \`$1'" >&2
33+
exit 1
34+
;;
35+
esac
36+
37+
# dh_installdeb will replace this with shell code automatically
38+
# generated by other debhelper scripts.
39+
40+
#DEBHELPER#
41+
42+
exit 0

debian/postrm

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/sh
2+
# postinst script for an Apache virtual host component of plista
3+
#
4+
# see: dh_installdeb(1)
5+
6+
set -e
7+
8+
# summary of how this script can be called:
9+
# * <postrm> `remove'
10+
# * <postrm> `purge'
11+
# * <old-postrm> `upgrade' <new-version>
12+
# * <new-postrm> `failed-upgrade' <old-version>
13+
# * <new-postrm> `abort-install'
14+
# * <new-postrm> `abort-install' <old-version>
15+
# * <new-postrm> `abort-upgrade' <old-version>
16+
# * <disappearer's-postrm> `disappear' <overwriter>
17+
# <overwriter-version>
18+
# for details, see http://www.debian.org/doc/debian-policy/ or
19+
# the debian-policy package
20+
21+
case "$1" in
22+
purge)
23+
if [ -e /etc/php5/conf.d/redis.ini ]; then
24+
rm -f /etc/php5/conf.d/redis.ini
25+
fi
26+
;;
27+
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
28+
;;
29+
30+
*)
31+
echo "postrm called with unknown argument \`$1'" >&2
32+
exit 1
33+
;;
34+
esac
35+
36+
# dh_installdeb will replace this with shell code automatically
37+
# generated by other debhelper scripts.
38+
39+
#DEBHELPER#
40+
41+
exit 0

debian/rules

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
#!/usr/bin/make -f
2+
# Sample debian/rules that uses debhelper.
3+
# This file is public domain software, originally written by Joey Hess.
4+
#
5+
# This version is for packages that are architecture dependent.
6+
7+
# Uncomment this to turn on verbose mode.
8+
#export DH_VERBOSE=1
9+
10+
DEB_SRCDIR=$(shell pwd)
11+
INSTALL_DIR=$(DEB_SRCDIR)/debian/$(shell dh_listpackages)
12+
EXTENSION_DIR=`php-config5 --extension-dir`
13+
CFLAGS = -O3
14+
15+
16+
build: build-stamp
17+
build-stamp:
18+
dh_testdir
19+
20+
# Add here commands to compile the package.
21+
22+
# Because phpize --clean removes all testfiles
23+
# in tests/*.php the svn-buildpackage will fail
24+
# when tests/TestRedis.php was removed.
25+
# So we backup the file:
26+
cd $(DEB_SRCDIR) && mv tests/TestRedis.php tests/TestRedis.php.bak && \
27+
phpize --clean && mv tests/TestRedis.php.bak tests/TestRedis.php && \
28+
phpize && \
29+
./configure --with-php-config=/usr/bin/php-config5
30+
$(MAKE) -C $(DEB_SRCDIR)
31+
32+
touch build-stamp
33+
34+
clean:
35+
dh_testdir
36+
dh_testroot
37+
rm -f build-stamp
38+
39+
# Add here commands to clean up after the build process.
40+
# See comment in build-stamp why doing the 'mv'
41+
cd $(DEB_SRCDIR) && mv tests/TestRedis.php tests/TestRedis.php.bak && \
42+
phpize --clean && mv tests/TestRedis.php.bak tests/TestRedis.php
43+
#$(MAKE) -C $(DEB_SRCDIR) clean
44+
#$(MAKE) distclean
45+
46+
dh_clean
47+
48+
install: build
49+
dh_testdir
50+
dh_testroot
51+
dh_prep
52+
dh_installdirs
53+
54+
# Add here commands to install the package into debian/<packagename>
55+
$(MAKE) prefix=$(INSTALL_DIR)/usr EXTENSION_DIR=$(INSTALL_DIR)$(EXTENSION_DIR) install
56+
57+
# Build architecture-independent files here.
58+
binary-indep: build install
59+
# We have nothing to do by default.
60+
61+
# Build architecture-dependent files here.
62+
binary-arch: build install
63+
dh_testdir
64+
dh_testroot
65+
dh_installchangelogs
66+
dh_installdocs
67+
dh_installexamples
68+
# dh_install
69+
# dh_installmenu
70+
# dh_installdebconf
71+
# dh_installlogrotate
72+
# dh_installemacsen
73+
# dh_installcatalogs
74+
# dh_installpam
75+
# dh_installmime
76+
# dh_installinit
77+
# dh_installcron
78+
# dh_installinfo
79+
# dh_installwm
80+
# dh_installudev
81+
# dh_lintian
82+
# dh_bugfiles
83+
# dh_undocumented
84+
dh_installman
85+
dh_link
86+
dh_strip
87+
dh_compress
88+
dh_fixperms
89+
# dh_perl
90+
# dh_makeshlibs
91+
dh_installdeb
92+
dh_shlibdeps
93+
cd $(DEB_SRCDIR) && \
94+
echo "php5:Depends=phpapi-`php-config5 --phpapi`, php5-common" >> debian/phpredis.substvars
95+
dh_gencontrol
96+
dh_md5sums
97+
dh_builddeb
98+
99+
binary: binary-indep binary-arch
100+
.PHONY: build clean binary-indep binary-arch binary install

0 commit comments

Comments
 (0)