-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathREADMEgit
78 lines (56 loc) · 2.59 KB
/
READMEgit
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
73
74
75
76
77
78
How to setup openprinting site and database from bazaar branch
==============================================================
1) Copy the whole contents of the site branch to a folder where it is going to
be located I.e.,
# cp printing-new/* /srv/www/openprinting/
2) Install the git and build-essential packages if you have not done so yet.
3) Install Foomatic into the setup:
# export WORKDIR=/srv/www/openprinting/foomatic
# cd $WORKDIR
# git clone https://github.com/openprinting/foomatic-db-engine.git
# git clone https://github.com/openprinting/foomatic-db.git
# git clone https://github.com/openprinting/foomatic-db-nonfree.git
# cd foomatic-db-engine
# ./make_configure
# ./configure
# make inplace
# cd ../..
4) Install a secondary copy of Foomatic for maintaining pre-built ppd files:
# export WORKDIR=/srv/www/openprinting/ppd/foomatic
# mkdir -p $WORKDIR
# cd $WORKDIR
# git clone https://github.com/openprinting/foomatic-db-engine.git
# git clone https://github.com/openprinting/foomatic-db.git
# git clone https://github.com/openprinting/foomatic-db-nonfree.git
# cd foomatic-db-engine
# ./make_configure
# ./configure
# make inplace
# ./foomatic-compiledb -j 4 -t ppd -f -d $WORKDIR/ppd/ppd-files
# cd ../../..
5) Create "inc/siteconf.php" configuration file for the site. You can use
siteconf-DEV.php or siteconf-PROD.php as a basis. In that file you should set
access parameters for the MySQL database, mail addresses and some other settings.
6) Edit the "build" script - set BASEDIR variable at the top of the script to the actual directory where the site is located
7) Launch the build script:
# ./build
Note that this script uses inc/siteconf.php to create mysql.conf file for
foomatic.
8) If you want to create openprinting database from scratch, launch setupdb.sh
script from the maint/scripts folder:
# cd maint/scripts
# ./setupdb.sh
Note that setupdb.sh uses inc/siteconf.php to get database access parameters.
9) Now you can populate the database using the data from git using
"importfromgit" script which tries to parse printer xml files and load them
to the database. Let's try to import everything from foomatic-db and
foomatic-db-nonfree:
# export WORKDIR=/srv/www/openprinting/foomatic
# maint/scripts/loaddb $WORKDIR/foomatic-db
# maint/scripts/loaddb $WORKDIR/foomatic-db-nonfree
Note: In git, revno is denoted by the SHA hash of the commit.
10) You can update the pre-built ppd files by running:
# cd /srv/www/openprinting/ppd/
# ./updateppdfromgit
======
That's all. Now you should be able to access your copy of the openprinting site.