This repository has been archived by the owner on Nov 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
/
build.sh
72 lines (57 loc) · 1.64 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
VERSION=`cat p4a/constants.php | grep P4A_VERSION | cut -d \' -f4`
SRCDIR=`pwd`
TMPDIR='/tmp'
# preparing creation
cd $TMPDIR
rm -r p4apackages
mkdir p4apackages
cd p4apackages
PKGDIR=`pwd`
cp -r $SRCDIR p4a
###########################
# BUILDING CODE REFERENCE #
###########################
cd $PKGDIR
mkdir code-reference
cd $SRCDIR
phpdoc -q on -d 'p4a/' -ti 'P4A - PHP For Applications' -dn 'p4a' -dc 'PHP For Applications' -pp on -dh off -t $PKGDIR/code-reference -i 'Zend/,pear_net_useragent_detect.php,p4a_db_table.php' -o 'HTML:frames:earthli' -ric 'CHANGELOG,README,COPYING' -f 'CHANGELOG,README,COPYING'
##########################
# cleaning master source #
##########################
cd $PKGDIR
rm p4a/.project
rm p4a/build.sh
rm -rf p4a/debian
rm -rf p4a/.cache
rm -rf p4a/.settings
rm -rf p4a/.buildpath
rm -rf `find -type d -name '.svn'`
rm -f `find -name '.cvsignore'`
##############################################
# COPYING DEFAULT DOCUMENTATION INTO PACKAGE #
##############################################
cd $PKGDIR
sed 's/blank.html/ric_README.html/' code-reference/index.html > index.html
mv index.html code-reference/
cp -r code-reference p4a/docs
##############################
# creating framework package #
##############################
cd $PKGDIR
mv p4a p4a-$VERSION
zip -qr9 p4a-$VERSION.zip p4a-$VERSION
tar zcf p4a-$VERSION.tgz p4a-$VERSION
#############################
# generating debian package #
#############################
cd p4a-$VERSION
mv docs code-reference
cp -r $SRCDIR/debian .
rm -rf `find -type d -name '.svn'`
dpkg-buildpackage
###############
# cleaning up #
###############
cd $PKGDIR
rm -r p4a-$VERSION