blob: 0cadd6dfbe616f0b09b9108bf3f0ea5f61b35094 (
plain)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
|
pkgname=fusiondirectory-plugin-posix
pkgver=1.2
pkgrel=0
pkgdesc="Posix plugin for fusiondirectory"
arch=("any")
url="http://fusiondirectory.org/"
license=("LGPL")
depends=("fusiondirectory>=1.0.9")
install=fusiondirectory-plugin-posix.install
source=("http://repos.fusiondirectory.org/sources/1.0/fusiondirectory/fusiondirectory-plugins-${pkgver}.tar.gz"
"http://repos.fusiondirectory.org/sources/1.0/fusiondirectory/fusiondirectory-${pkgver}.tar.gz")
md5sums=('b5e96dc4deaed932868a809769ef8a71' '5447138f0e37bebd9c2dbed41b787f27')
package() {
cd ./fusiondirectory-plugins-${pkgver}
# Go in plugin directory
cd posix/
# Plugin developers
if [ "posix" = "developers" ] ; then
mkdir -p ${pkgdir}/usr/share/doc/fusiondirectory-developers/
mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/
mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/html/plugins/debug-help
cp -a ./CODING ${pkgdir}/usr/share/doc/fusiondirectory-developers/
cp -a ./Doxyfile ${pkgdir}/usr/share/doc/fusiondirectory-developers/
cp -a ./FDStandard ${pkgdir}/usr/share/doc/fusiondirectory-developers/
cp -a ./filter.xsd ${pkgdir}/usr/share/doc/fusiondirectory-developers/
cp -a ./list.xsd ${pkgdir}/usr/share/doc/fusiondirectory-developers/
cp -a ./simple-plugin ${pkgdir}/usr/share/doc/fusiondirectory-developers/
cp -a ./debug-help ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/
cp -a ./debug-help/html/images ${pkgdir}/usr/share/webapps/fusiondirectory/html/plugins/debug-help
else
# Addons section
if [ -d ./addons ] ; then
mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/addons/
# Directories
for cur_addons in $(find ./addons -mindepth 1 -maxdepth 1 -type d) ; do
addons_line="$(echo ${cur_addons} | sed "s#./addons/##")"
cp -a ./addons/${addons_line} ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/addons/${addons_line}
done
# Files
for cur_addons in $(find ./addons -mindepth 1 -maxdepth 1 -type f) ; do
addons_line="$(echo ${cur_addons} | sed "s#./addons/##")"
cp -a ./addons/${addons_line} ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/addons/
done
fi
# Admin section
if [ -d ./admin ] ; then
mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/admin/
# Directories
for cur_admin in $(find ./admin -mindepth 1 -maxdepth 1 -type d) ; do
admin_line="$(echo ${cur_admin} | sed "s#./admin/##")"
cp -a ./admin/${admin_line} ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/admin/${admin_line}
done
# Files
for cur_admin in $(find ./admin -mindepth 1 -maxdepth 1 -type f) ; do
admin_line="$(echo ${cur_admin} | sed "s#./admin/##")"
cp -a ./admin/${admin_line} ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/admin/${admin_line}
done
fi
# Config section
if [ -d ./config ] ; then
mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/config/
# Directories
for cur_config in $(find ./config -mindepth 1 -maxdepth 1 -type d) ; do
config_line="$(echo ${cur_config} | sed "s#./config/##")"
cp -a ./config/${config_line} ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/config/
done
# Files
for cur_config in $(find ./config -mindepth 1 -maxdepth 1 -type f) ; do
config_line="$(echo ${cur_config} | sed "s#./config/##")"
cp -a ./config/${config_line} ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/config/
done
fi
# HTML section
if [ -d ./html ] ; then
if [ "posix" = "addressbook" ] ; then
mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/html/plugins/posix/
cp -a ./html/images/ ${pkgdir}/usr/share/webapps/fusiondirectory/html/plugins/posix/
cp -a ./html/getvcard.php ${pkgdir}/usr/share/webapps/fusiondirectory/html/plugins/posix/
elif [ "posix" = "argonaut" ] ; then
mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/html/plugins/posix/
cp -a ./html/themes/ ${pkgdir}/usr/share/webapps/fusiondirectory/html/
cp -a ./html/getFAIstatus.php ${pkgdir}/usr/share/webapps/fusiondirectory/html/plugins/posix/
elif [ "posix" = "fusioninventory" ] ; then
mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/html/
mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/html/plugins/posix/
cp -a ./html/collect.php ${pkgdir}/usr/share/webapps/fusiondirectory/html/
cp -a ./html/themes/ ${pkgdir}/usr/share/webapps/fusiondirectory/html/
cp -a ./html/plugins/inventory.css ${pkgdir}/usr/share/webapps/fusiondirectory/html/plugins/posix/
elif [ "posix" = "webservice" ] ; then
mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/html/
cp -a ./html/jsonrpc.php ${pkgdir}/usr/share/webapps/fusiondirectory/html/
else
# Images directory
if [[ -d ./html/images ]] ; then
mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/html/plugins/posix/
cp -a ./html/images/ ${pkgdir}/usr/share/webapps/fusiondirectory/html/plugins/posix/
fi
# Themes directory
if [[ -d ./html/themes ]] ; then
mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/html/
cp -a ./html/themes/ ${pkgdir}/usr/share/webapps/fusiondirectory/html/
fi
fi
fi
# Include section
if [ -d ./include ] ; then
# Directories
for cur_include in $(find ./include -mindepth 1 -maxdepth 1 -type d) ; do
include_line="$(echo ${cur_include} | sed "s#./include/##")"
cp -a ./include/${include_line} ${pkgdir}/usr/share/webapps/fusiondirectory/include/
done
# Files
for cur_include in $(find ./include -mindepth 1 -maxdepth 1 -type f) ; do
include_line="$(echo ${cur_include} | sed "s#./include/##")"
cp -a ./include/${include_line} ${pkgdir}/usr/share/webapps/fusiondirectory/include/
done
fi
# Locale section
if [ -d ./locale ] ; then
mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/locale/plugins/addressbook/locale/
# Directories
for cur_locale in $(find ./locale -mindepth 1 -maxdepth 1 -type d) ; do
locale_line="$(echo ${cur_locale} | sed "s#./locale/##")"
cp -a ./locale/${locale_line} ${pkgdir}/usr/share/webapps/fusiondirectory/locale/plugins/addressbook/locale/
done
# Files
for cur_locale in $(find ./locale -mindepth 1 -maxdepth 1 -type f) ; do
locale_line="$(echo ${cur_locale} | sed "s#./locale/##")"
cp -a ./locale/${locale_line} ${pkgdir}/usr/share/webapps/fusiondirectory/locale/plugins/addressbook/locale/
done
fi
# Personal section
if [ -d ./personal ] ; then
mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/personal/
# Directories
for cur_personal in $(find ./personal -mindepth 1 -maxdepth 1 -type d) ; do
personal_line="$(echo ${cur_personal} | sed "s#./personal/##")"
cp -a ./personal/${personal_line} ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/personal/
done
# Files
for cur_personal in $(find ./personal -mindepth 1 -maxdepth 1 -type f) ; do
personal_line="$(echo ${cur_personal} | sed "s#./personal/##")"
cp -a ./personal/${personal_line} ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/personal/
done
fi
# Contrib section for samba and supann
if [ "posix" = "samba" ] ; then
mkdir -p ${pkgdir}/usr/share/doc/fusiondirectory-plugin-samba/
cp -a ./contrib/fix_munged ${pkgdir}/usr/share/doc/fusiondirectory-plugin-samba/
elif [ "posix" = "supann" ] ; then
mkdir -p ${pkgdir}/usr/share/doc/fusiondirectory-plugin-supann/examples/
cp -a ./contrib/supann/* ${pkgdir}/usr/share/doc/fusiondirectory-plugin-supann/examples/
fi
# SQL section
if [ -d ./contrib/sql ] ; then
mkdir -p ${pkgdir}/usr/share/doc/fusiondirectory-plugin-posix-schema/
cp ../../fusiondirectory-${pkgver}/{AUTHORS,Changelog,COPYING} ${pkgdir}/usr/share/doc/fusiondirectory-plugin-posix-schema/
# Directories
for cur_sql in $(find ./contrib/sql -mindepth 1 -maxdepth 1 -type d) ; do
sql_line="$(echo ${cur_sql} | sed "s#./contrib/sql/##")"
cp -a ./contrib/sql/${sql_line} ${pkgdir}/usr/share/doc/fusiondirectory-plugin-posix-schema/
done
# Files
for cur_sql in $(find ./contrib/sql -mindepth 1 -maxdepth 1 -type f ! -name "example.ldif" ) ; do
sql_line="$(echo ${cur_sql} | sed "s#./contrib/sql/##")"
cp -a ./contrib/sql/${sql_line} ${pkgdir}/usr/share/doc/fusiondirectory-plugin-posix-schema/
done
fi
fi
# Docs
mkdir -p ${pkgdir}/usr/share/doc/fusiondirectory-plugin-posix/
cp ../../fusiondirectory-${pkgver}/{AUTHORS,Changelog,COPYING} ${pkgdir}/usr/share/doc/fusiondirectory-plugin-posix/
}
|