Skip to content

Commit cf0ebe8

Browse files
committed
add pecl environments
1 parent 7886438 commit cf0ebe8

File tree

6 files changed

+216
-192
lines changed

6 files changed

+216
-192
lines changed

INSTALL

-96
This file was deleted.

LICENSE

+27-33
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,31 @@
1-
$Id$
2-
Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995.
3-
Software written by Ian F. Darwin and others;
4-
maintained 1994-2003 Christos Zoulas.
5-
6-
PHP code written by JoungKyun.Kim
7-
maintained 2015 JoungKyun.Kim
8-
9-
This software is not subject to any export provision of the United States
10-
Department of Commerce, and may be exported to any country or planet.
1+
Copyright (c) 2015, JoungKyun.Kim
2+
All rights reserved.
113

124
Redistribution and use in source and binary forms, with or without
135
modification, are permitted provided that the following conditions
146
are met:
15-
1. Redistributions of source code must retain the above copyright
16-
notice immediately at the beginning of the file, without modification,
17-
this list of conditions, and the following disclaimer.
18-
2. Redistributions in binary form must reproduce the above copyright
19-
notice, this list of conditions and the following disclaimer in the
20-
documentation and/or other materials provided with the distribution.
21-
3. All advertising materials mentioning features or use of this software
22-
must display the following acknowledgement:
23-
This product includes software developed by Ian F. Darwin and others.
24-
4. The name of the author may not be used to endorse or promote products
25-
derived from this software without specific prior written permission.
26-
27-
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
28-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30-
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
31-
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33-
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34-
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35-
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36-
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37-
SUCH DAMAGE.
7+
8+
* Redistributions of source code must retain the above copyright
9+
notice, this list of conditions and the following disclaimer.
10+
* Redistributions in binary form must reproduce the above
11+
copyright notice, this list of conditions and the following
12+
disclaimer in the documentation and/or other materials provided
13+
with the distribution.
14+
* Neither the name of the Joseph Miller nor the names of its
15+
contributors may be used to endorse or promote products derived
16+
from this software without specific prior written permission.
17+
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21+
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22+
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
28+
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29+
POSSIBILITY OF SUCH DAMAGE.
30+
31+
See README, INSTALL, and USAGE files for more details.

README.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# PHP file extension
2+
3+
## Description
4+
5+
filebin PHP 확장은 /bin/file 명령의 결과와 동일하게 동작한다.
6+
7+
## Installation
8+
9+
```bash
10+
[root@host filebin]$ phpize
11+
[root@host filebin]$ # --with-libdir 옵션은 64bit 환경에서만 지정합니다.
12+
[root@host filebin]$ ./configure --with-libdir=lib64
13+
[root@host filebin]$ make test PHP_EXECUTABLE=/usr/bin/php
14+
[root@host filebin]$ make install
15+
```
16+
17+
## Loading
18+
19+
regist filebin.so in php.ini or php sub configuration.
20+
21+
```ini
22+
; for PHP 7.1 and before
23+
extension = filebin.so
24+
25+
; for PHP 7.2 and after
26+
extension = filebin
27+
; and also regist with absolute path
28+
extension = /path/filebin.so
29+
```
30+
31+
## Usage
32+
33+
See also included test.php on source

acconfig.h

-54
This file was deleted.

init.sh

+68-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,68 @@
1-
#!/bin/sh
2-
[ -f Makefile ] && make distclean
3-
rm -f config.guess config.h config.h.in config.nice config.sub configure configure.in
4-
rm -f acinclude.m4 aclocal.m4 tags
5-
rm -rf autom4te.cache build include modules
6-
rm -f install-sh missing mkinstalldirs ltmain.sh
7-
rm -f .deps Makefile.global
8-
rm -f *~
9-
rm -f tests/*.{diff,exp,log,out,php,sh,mem}
1+
#!/bin/bash
2+
3+
source /usr/share/annyung-release/functions.d/bash/functions
4+
5+
errmsg () {
6+
echo "$*" > /dev/stderr
7+
}
8+
9+
usage () {
10+
echo "Usage: $0 [clean|pack]"
11+
exit 1
12+
}
13+
14+
opts=$(getopt -u -o h -l help -- "$@")
15+
[ $? != 0 ] && usage
16+
17+
set -- ${opts}
18+
for i
19+
do
20+
case "$i" in
21+
-h|--help)
22+
usage
23+
shift
24+
;;
25+
--)
26+
shift
27+
break
28+
;;
29+
esac
30+
done
31+
32+
case "${1}" in
33+
clean)
34+
[ -f Makefile ] && make distclean
35+
rm -rf include autom4te* build modules tags
36+
rm -f Makefile.g* Makefile.f* Makefile.o* Makefile
37+
rm -f config.log config.nice config.g* config.s* config.h*
38+
rm -f ac* configure* mkinstalldirs .deps missing ltmain.sh
39+
rm -f run-tests.php install* libtool
40+
rm -f tests/*.{diff,exp,log,out,php,sh,mem}
41+
42+
rm -f package.xml
43+
;;
44+
pack)
45+
cp -af package.xml.tmpl package.xml
46+
list=$(grep "md5sum" ./package.xml | sed -r 's/.*"@|@".*//g')
47+
48+
for i in ${list}
49+
do
50+
md5s=$(md5sum "$i" | awk '{print $1}')
51+
perl -pi -e "s!\@${i}\@!${md5s}!g" ./package.xml
52+
done
53+
54+
curdate=$(date +'%Y-%m-%d')
55+
curtime=$(date +'%H:%M:%S')
56+
57+
perl -pi -e "s!\@curdate\@!${curdate}!g" ./package.xml
58+
perl -pi -e "s!\@curtime\@!${curtime}!g" ./package.xml
59+
60+
pecl package
61+
rm -f package.xml
62+
;;
63+
*)
64+
errmsg "Unsupport mode '${1}'"
65+
exit 1
66+
esac
67+
68+
exit 0

0 commit comments

Comments
 (0)