Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 06652f19

Von Holger Lindemann vor fast 14 Jahren hinzugefügt

Struktur in Tar-File gepackt

Script zum Paketbau geändert

Unterschiede anzeigen:

DEBIAN/DEBIAN/conffiles
1 1
/etc/lx-office-erp/lx-office-erp.apache2.conf
2 2
/etc/lx-office-erp/lx-office-erp.cherokee
3 3
/etc/lx-office-erp/lx-office-erp.cherokee.handler
4
/etc/lx-office-erp/lx-erp.conf.default
5
/etc/lx-office-erp/console.conf.default
6
/etc/lx-office-erp/authentication.pl.default
DEBIAN/DEBIAN/postinst
81 81
	db_get lx-office-erp/admin-password
82 82
	ADMINPASSWORD="$RET"
83 83

  
84
	#cat /usr/lib/lx-office-erp/config/authentication.pl.default | \
85 84
	cat /etc/lx-office-erp/authentication.pl.default | \
86 85
	sed --expression "s/\$self->{admin_password} = 'admin';/\$self->{admin_password} = '$ADMINPASSWORD';/g" \
87 86
	> /tmp/1.txt
88 87

  
89
	#mv /tmp/1.txt /usr/lib/lx-office-erp/config/authentication.pl
90 88
	mv /tmp/1.txt /etc/lx-office-erp/authentication.pl
91 89

  
92
	#chmod 0600 /usr/lib/lx-office-erp/config/authentication.pl
93
	#chown www-data:www-data /usr/lib/lx-office-erp/config/authentication.pl
94

  
95 90
}
96 91

  
97 92

  
......
99 94
	db_get lx-office-erp/lx-office-erp-user-postgresql-password
100 95
	PASSWORD="$RET"
101 96

  
102
	#cat /usr/lib/lx-office-erp/config/authentication.pl | \
103 97
	cat /etc/lx-office-erp/authentication.pl | \
104 98
	sed --expression "s/'password' => '',/'password' => '$PASSWORD',/g" \
105 99
	> /tmp/1.txt
106 100

  
107
	#mv /tmp/1.txt /usr/lib/lx-office-erp/config/authentication.pl
108 101
	mv /tmp/1.txt /etc/lx-office-erp/authentication.pl
109 102

  
110 103
}
......
112 105
set_lx_office_erp_authentication_db_user() {
113 106
	USER="lxoffice"
114 107

  
115
	#cat /usr/lib/lx-office-erp/config/authentication.pl | \
116 108
	cat /etc/lx-office-erp/authentication.pl | \
117 109
	sed --expression "s/'user'     => 'postgres',/'user'     => '$USER',/g" \
118 110
	> /tmp/1.txt
119 111

  
120
	#mv /tmp/1.txt /usr/lib/lx-office-erp/config/authentication.pl
121 112
	mv /tmp/1.txt /etc/lx-office-erp/authentication.pl
122 113
}
123 114

  
124 115
set_user_rights() {
125 116
	chown -R www-data:www-data /usr/lib/lx-office-erp/users
126 117
	chown -R www-data:www-data /usr/lib/lx-office-erp/templates
127
    chown www-data:www-data /etc/lx-office-erp/lx-erp.conf
128
    chown www-data:www-data /usr/lib/lx-office-erp/menu.ini
129
    chown www-data:www-data /etc/lx-office-erp/authentication.pl
130
    chmod 0600 /etc/lx-office-erp/lx-erp.conf
131
    chmod 0600 /etc/lx-office-erp/authentication.pl
118
	chown www-data:www-data /etc/lx-office-erp/lx-erp.conf
119
	chown www-data:www-data /usr/lib/lx-office-erp/menu.ini
120
	chown www-data:www-data /etc/lx-office-erp/authentication.pl
121
	chmod 0600 /etc/lx-office-erp/lx-erp.conf
122
	chmod 0600 /etc/lx-office-erp/authentication.pl
132 123
}
133 124

  
134 125
disable_ipv6_on_lo_interface() {
......
159 150
    if ! [ -f /etc/lx-office-erp/lx-erp.conf ] ; then
160 151
        cp /etc/lx-office-erp/lx-erp.conf.default /etc/lx-office-erp/lx-erp.conf
161 152
    fi
153
    if ! [ -f /etc/lx-office-erp/console.conf ] ; then
154
        cp /etc/lx-office-erp/console.conf.default /etc/lx-office-erp/console.conf
155
    fi
162 156
}  
163 157

  
164 158
mk_links() {
......
168 162
    if ! [ -f /usr/lib/lx-office-erp/config/lx-erp.conf ] ; then
169 163
        ln -s /etc/lx-office-erp/lx-erp.conf /usr/lib/lx-office-erp/config/lx-erp.conf
170 164
    fi;
165
    if ! [ -f /usr/lib/lx-office-erp/config/console.conf ] ; then
166
        ln -s /etc/lx-office-erp/console.conf /usr/lib/lx-office-erp/config/console.conf
167
    fi;
171 168
    if [ -e /etc/apache2 ] ; then 
172 169
        if ! [ -f /etc/apache2/conf.d/lx-office-erp.apache2.conf ] ; then
173 170
            ln -s /etc/lx-office-erp/lx-office-erp.apache2.conf /etc/apache2/conf.d/lx-office-erp.apache2.conf
DEBIAN/files/lx-office-erp
1
#!/bin/sh
2
#
3
## shell script for lx-office-erp to start the login manager in a browser
4

  
5
set -e
6

  
7
/usr/bin/sensible-browser http://localhost/lx-office-erp/login.pl
8

  
9

  
DEBIAN/files/lx-office-erp.apache2.conf
1
AddHandler cgi-script .pl
2
Alias /lx-office /usr/lib/lx-office-erp/
3
Alias /lx-office-erp /usr/lib/lx-office-erp/
4

  
5
<Directory /usr/lib/lx-office-erp>
6
  Options ExecCGI Includes FollowSymlinks
7
  DirectoryIndex login.pl
8
  AddDefaultCharset UTF-8
9
</Directory>
10

  
11
<Directory /usr/lib/lx-office-erp/users>
12
  Order Deny,Allow
13
  Deny from All
14
</Directory>
DEBIAN/files/lx-office-erp.cherokee
1
##
2
## Virtual server for lx-office-erp
3
##
4
Directory /lx-office-erp {
5
      Handler common
6
	  DocumentRoot /usr/lib/lx-office-erp/
7
}	  
8
Directory /lx-office-erp/image {
9
	  DocumentRoot /usr/share/lx-office-erp/
10
}	  
11
Directory /lx-office-erp/css{
12
	  DocumentRoot /var/lib/lx-office-erp/css
13
}	  
14
Directory /lx-office-erp/templates{
15
	  DocumentRoot /var/lib/lx-office-erp/templates
16
}	  
17
Directory /lx-office-erp/users{
18
	  DocumentRoot /var/lib/lx-office-erp/users
19
}	  
20
Directory /lx-office-erp/webdav{
21
	  DocumentRoot /var/lib/lx-office-erp/webdav
22
}	  
23
Directory /lx-office-erp/spool{
24
	  DocumentRoot /var/lib/lx-office-erp/spool
25
}	  
DEBIAN/files/lx-office-erp.cherokee.handler
1
Extension pl {
2
    Handler cgi
3
}
DEBIAN/mk_erp_deb.sh
4 4
NR="0"
5 5

  
6 6
#hier wurde das Git-Paket entpakt:
7
SRC=/tmp/deb_test/unstable
7
SRC=/tmp/lx-office-erp
8 8

  
9 9
#hier wird das Debian-Paket gebaut:
10
DST=/tmp/deb_test/package
10
DST=/tmp/package
11 11

  
12 12

  
13 13
################################################
......
17 17
VER=`cat VERSION`
18 18
DEST=$DST/lx-office-erp_$VER-$NR-all
19 19

  
20
FILES='
21
usr/lib/lx-office-erp/
22
usr/share/lx-office-erp/
23
usr/share/doc/lx-office-erp/
24
var/lib/lx-office-erp/spool/
25
var/lib/lx-office-erp/users/
26
var/lib/lx-office-erp/css/
27
var/lib/lx-office-erp/xslt/
28
var/lib/lx-office-erp/templates/
29
var/lib/lx-office-erp/webdav/lieferantenbestellungen/
30
var/lib/lx-office-erp/webdav/anfragen/
31
var/lib/lx-office-erp/webdav/gutschriften/
32
var/lib/lx-office-erp/webdav/einkaufsrechnungen/
33
var/lib/lx-office-erp/webdav/rechnungen/
34
var/lib/lx-office-erp/webdav/bestellungen/
35
var/lib/lx-office-erp/webdav/angebote/
36
usr/lib/lx-office-erp/
37
usr/share/lx-office-erp/
38
usr/share/doc/lx-office-erp/
39
usr/share/man/man1/:lx-office-erp.1.gz
40
etc/lx-office-erp/:lx-office-erp.cherokee.handler
41
etc/lx-office-erp/:lx-office-erp.apache2.conf
42
etc/lx-office-erp/:lx-office-erp.cherokee
43
usr/bin/:lx-office-erp
44
'
45

  
46
for filespec in $FILES; do
47
  set - `echo $filespec | sed -e 's/:/ /g'`
48
  dir=$1
49
  file=$2
50
  mkdir -p $SRC/DEBIAN/$dir
51
  if [ -f $SRC/DEBIAN/files/$file ]; then
52
    cp  $SRC/DEBIAN/files/$file $SRC/DEBIAN/$dir/$file
53
  else
54
    echo '1' > $SRC/DEBIAN/$dir/.dummy
55
  fi
56
done
57

  
58
SYMLINKS='
59
css:/var/lib/lx-office-erp/css
60
doc:/usr/share/doc/lx-office-erp/
61
image:/usr/share/lx-office-erp
62
spool:/var/lib/lx-office-erp/spool
63
templates:/var/lib/lx-office-erp/templates
64
users:/var/lib/lx-office-erp/users/
65
webdav:/var/lib/lx-office-erp/webdav
66
xslt:/var/lib/lx-office-erp/xslt
67
'
68

  
69
for symspec in $SYMLINKS; do
70
  set - `echo $symspec | sed -e 's/:/ /g'`
71
  src=$1
72
  tar=$2
73

  
74
  ln -s $tar $SRC/DEBIAN/usr/lib/lx-office-erp/$src
75
done
76
#fertig
77 20

  
78 21
mkdir -p $DEST
79 22
cd $DEST
80 23

  
81 24
#Struktur anlegen:
82
cp -a $SRC/DEBIAN/* .
83
rm ./mk*.sh
25
cp -a $SRC/DEBIAN/DEBIAN .
26
tar xzf $SRC/DEBIAN/struktur.tgz
84 27

  
85 28
#Dateien kopieren:
86 29
#aber keine fertigen Konfigurationen, nur *.default
......
97 40
cp $SRC/VERSION usr/lib/lx-office-erp
98 41
cp $SRC/index.html usr/lib/lx-office-erp
99 42
cp $SRC/config/lx-erp.conf  etc/lx-office-erp/lx-erp.conf.default
43
cp $SRC/config/console.conf.default etc/lx-office-erp/
100 44
cp $SRC/config/authentication.pl.default etc/lx-office-erp/
101 45
cp $SRC/menu.ini usr/lib/lx-office-erp/menu.default
102 46
cp -a $SRC/css var/lib/lx-office-erp

Auch abrufbar als: Unified diff