-
Notifications
You must be signed in to change notification settings - Fork 2
/
tsm4ubuntu
executable file
·647 lines (583 loc) · 16.8 KB
/
tsm4ubuntu
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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
#!/bin/bash
#
# all the documentation is on the github:
# https://github.com/briner/tsm4ubuntu-12.04
# in the README
if [[ $(uname -p) != 'x86_64' ]] ; then
echo "this script only works for amd64 distribution"
exit 1
fi
define_variable()
{
# TSM_ROOT defines the path where the rpms are. tsm4ubuntu will work
# in this directory
TSM_ROOT=~/tsm/6.3.1.0
# the name of the package will be
# <short_org>-<TSM_NAME>-{ba,api..}_<TSM_VER>-<DDEB_VER>
TSM_NAME=TSM ; # usually it is "TSM"
TSM_VER=6.3.1
SHORT_ORG=UiS ; # a short name of your organisation
# where the tsm files will be installed without the first and the last "/"
OPT_PATH='opt/tivoli/tsm' ; # usually it is "opt/tivoli/tsm"
# email of the packager of these
EMAIL_MAINTAINER='Martin Goldhahn <[email protected]>'
# should the init script use dsmc or dsmcad
MODE=dsmcad
#
# this variable define the name of the rpm for each element
unset drpm
declare -Ag drpm
drpm["crypt"]="gskcrypt64-8.0.14.14.linux.x86_64.rpm"
drpm["ssl"]="gskssl64-8.0.14.14.linux.x86_64.rpm"
drpm["api"]="TIVsm-API64.x86_64.rpm"
drpm["ba"]="TIVsm-BA.x86_64.rpm"
#
# this variable define of the version of packaging for each element
# you should be "0" for your first time.
unset ddeb_ver
declare -Ag ddeb_ver
ddeb_ver["crypt"]="1"
ddeb_ver["ssl"]="1"
ddeb_ver["ba"]="1"
ddeb_ver["api"]="1"
ddeb_ver["integration"]="1" ; # this is only used at the University of Geneva
}
rpm2dir()
{
define_variable
for rpm in ${drpm[*]} ; do
cd ${TSM_ROOT}
d=cpio_${rpm%.rpm}
[ -d $d ] && rm -fr $d
echo "extracting $rpm in $d"
mkdir $d
cd $d
rpm2cpio ../${rpm} | cpio -idm
done
}
###########################################################
# gskcrypt64
#
wrap_crypt()
{
OBJ=crypt
# constructed variable
define_variable
DEB_VER=${ddeb_ver[${OBJ}]}
DEBNAME=${SHORT_ORG,,}-${TSM_NAME,,}-${OBJ}
DEB_BUILD=${TSM_ROOT}/${DEBNAME}_${TSM_VER}-${DEB_VER}
cd ${TSM_ROOT}
[ -d ${DEB_BUILD} ] && rm -fr ${DEB_BUILD}
mkdir -p ${DEB_BUILD}/{DEBIAN,${OPT_PATH}/gsk8_64}
rsync -aHl cpio_${drpm[${OBJ}]%.rpm}/usr/local/ibm/gsk8_64/ ${DEB_BUILD}/${OPT_PATH}/gsk8_64/
#
#
# DEBIAN control
cat > ${DEB_BUILD}/DEBIAN/control << EOF
Package: ${DEBNAME}
Version: ${TSM_VER}-${DEB_VER}
Architecture: amd64
Maintainer: ${EMAIL_MAINTAINER}
Section: non-free/contrib
Priority: extra
Description: gskcrypt64 for ${TSM_NAME} @ ${SHORT_ORG}
Crypto Library for ${TSM_NAME}
TSM stands for Tivoli Storage Manager and it is a solution for backuping is
machine at ${SHORT_ORG}.
EOF
#
#
# construct the package
fakeroot dpkg -b ${DEB_BUILD}
}
###########################################################
# gskssl64
#
wrap_ssl()
{
OBJ=ssl
# constructed variable
define_variable
DEB_VER=${ddeb_ver[${OBJ}]}
DEBNAME=${SHORT_ORG,,}-${TSM_NAME,,}-${OBJ}
DEB_BUILD=${TSM_ROOT}/${DEBNAME}_${TSM_VER}-${DEB_VER}
cd ${TSM_ROOT}
[ -d ${DEB_BUILD} ] && rm -fr ${DEB_BUILD}
mkdir -p ${DEB_BUILD}/{DEBIAN,${OPT_PATH}/gsk8_64}
rsync -aHl cpio_${drpm[${OBJ}]%.rpm}/usr/local/ibm/gsk8_64/ ${DEB_BUILD}/${OPT_PATH}/gsk8_64/
#
#
# DEBIAN control
cat > ${DEB_BUILD}/DEBIAN/control << EOF
Package: ${DEBNAME}
Version: ${TSM_VER}-${DEB_VER}
Architecture: amd64
Maintainer: ${EMAIL_MAINTAINER}
Section: non-free/contrib
Priority: extra
Description: gskssl64 for ${TSM_NAME} @ ${SHORT_ORG}
SSL Library for ${TSM_NAME}
TSM stands for Tivoli Storage Manager and it is a solution for backuping is
machine at ${SHORT_ORG}.
EOF
#
#
# construct the package
fakeroot dpkg -b ${DEB_BUILD}
}
###########################################################
# API
#
wrap_api()
{
OBJ=api
# constructed variable
define_variable
DEB_VER=${ddeb_ver[${OBJ}]}
DEBNAME=${SHORT_ORG,,}-${TSM_NAME,,}-${OBJ}
DEB_BUILD=${TSM_ROOT}/${DEBNAME}_${TSM_VER}-${DEB_VER}
cd ${TSM_ROOT}
[ -d ${DEB_BUILD} ] && rm -fr ${DEB_BUILD}
mkdir -p ${DEB_BUILD}/{DEBIAN,${OPT_PATH}/client}
rsync -aHl cpio_${drpm[${OBJ}]%.rpm}/opt/tivoli/tsm/client/ ${DEB_BUILD}/${OPT_PATH}/client/
#
rsync -aHl --force --delete cpio_${drpm[${OBJ}]%.rpm}/usr/lib64/ ${DEB_BUILD}/${OPT_PATH}/lib/
cd ${DEB_BUILD}/${OPT_PATH}/lib/
# relink to the good position the library
for map in $(ls -l * | \
sed "s|[[:blank:]]\{2\}| |g" | \
cut -d ' ' -f9- | \
sed "s| -> |<==>| ; s|/../opt/tivoli/tsm/|/|" ) ; do
target=$(echo $map | sed 's|.*<==>||')
link_name=$(echo $map | sed 's|<==>.*||')
ln -sf ${target} ${link_name}
done
cd - > /dev/null
#
#
cat > ${DEB_BUILD}/DEBIAN/control << EOF
Package: ${DEBNAME}
Version: ${TSM_VER}-${DEB_VER}
Architecture: amd64
Maintainer: ${EMAIL_MAINTAINER}
Section: non-free/contrib
Priority: extra
Description: api for ${TSM_NAME} @ ${SHORT_ORG}
API Library for ${TSM_NAME}
TSM stands for Tivoli Storage Manager and it is a solution for backuping is
machine at ${SHORT_ORG}.
EOF
#
#
# construct the package
fakeroot dpkg -b ${DEB_BUILD}
}
###########################################################
# BA
#
wrap_ba()
{
OBJ=ba
# constructed variable
define_variable
DEB_VER=${ddeb_ver[${OBJ}]}
DEBNAME=${SHORT_ORG,,}-${TSM_NAME,,}-${OBJ}
DEB_BUILD=${TSM_ROOT}/${DEBNAME}_${TSM_VER}-${DEB_VER}
cd ${TSM_ROOT}
[ -d ${DEB_BUILD} ] && rm -fr ${DEB_BUILD}
mkdir -p ${DEB_BUILD}/{DEBIAN,usr/bin,var/log/tsm,etc/init.d,${OPT_PATH}/bin}
mkdir -p ${DEB_BUILD}/{usr/share/pixmaps,usr/share/applications}
rsync -aHl cpio_${drpm[${OBJ}]%.rpm}/opt/tivoli/tsm/ ${DEB_BUILD}/${OPT_PATH}/
#
#
# to remove the error:
# ANS0102W Unable to open the message repository
# /opt/uau/tsm/client/ba/bin//EN_US/dsmclientV3.cat.
# The American English repository will be used instead.
cd ${DEB_BUILD}/${OPT_PATH}/client/ba/bin
ln -s ../../lang/EN_US
cd ${TSM_ROOT}
#
#
# LINK /etc/tsm ON ../tsm/client/ba/bin
cd ${DEB_BUILD}/${OPT_PATH}/client/ba/bin
ln -s /etc/tsm/dsm.opt .
ln -s /etc/tsm/dsm.sys .
cd ${TSM_ROOT}
#
#
# WRAPPER to easy the install of bin on /usr/bin and to
# let the agent to use this environment when passinf from user to root
cat > ${DEB_BUILD}/${OPT_PATH}/bin/tsm-wrapper << EOF
#!/bin/bash
# dsmj can use openjdk wahou # to force the use of Sun's Java
# dsmj can use openjdk wahou # export PATH=/usr/lib/jvm/java-6-sun/bin/:$PATH
export DSM_DIR=/${OPT_PATH}/client/ba/bin/
export LANG=en_US.UTF-8
export LC_TYPE=en_US.UTF-8
export LD_LIBRARY_PATH="/${OPT_PATH}/client/api/bin64:\
/${OPT_PATH}/gsk8/lib/:\
/${OPT_PATH}/lib/"
appname=\$(basename \$0)
exec \${DSM_DIR}/\${appname} \$@
EOF
chmod a+x ${DEB_BUILD}/${OPT_PATH}/bin/tsm-wrapper
#
#
# LDCONFIG
mkdir -p ${DEB_BUILD}/etc/ld.so.conf.d
cat > ${DEB_BUILD}/etc/ld.so.conf.d/${SHORT_ORG,,}-${TSM_NAME,,}.conf << EOF
/${OPT_PATH}/client/api/bin64
/${OPT_PATH}/gsk8_64/lib64
/${OPT_PATH}/lib
EOF
#
#
# LINK THE EXECUTABLE TO THE WRAPPER
cd ${DEB_BUILD}/usr/bin
for f in dsmadmc dsmagent dsmc dsmcad dsmj dsmswitch dsmtca dsmtrace ; do
ln -sf /${OPT_PATH}/bin/tsm-wrapper ${f}; done
cd ${TSM_ROOT}
#
#
if [[ "$MODE" == "dsmcad" ]] ; then
TSM_BIN=/usr/bin/dsmcad
DAEMON_START_COMMAND='start-stop-daemon --start --quiet --pidfile ${PIDFILE} --startas ${DAEMON} || log_end_msg 1'
DAEMON_PID_COMMAND='pidof -s dsmcad > $PIDFILE'
else
TSM_BIN=/usr/bin/dsmc
DAEMON_START_COMMAND='start-stop-daemon -Sqb --startas ${DAEMON} --pidfile ${PIDFILE} --make-pidfile --chdir ${DSM_LOG} -- schedule || log_end_msg 1'
DAEMON_PID_COMMAND='echo "no action" >/dev/null'
fi
# INIT SCRIPT
cat > ${DEB_BUILD}/etc/init.d/tsm << EOF
#!/bin/bash
### BEGIN INIT INFO
# Provides: tsm
# Required-Start: \$local_fs \$remote_fs \$network \$syslog
# Required-Stop: \$local_fs \$remote_fs \$network \$syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by tsm.
### END INIT INFO
DAEMON=${TSM_BIN}
DSM_LOG=/var/log/tsm
PIDFILE=/var/run/tsm.pid
. /lib/lsb/init-functions
start_tsm()
{
log_begin_msg "Starting TSM scheduler ..."
mkdir -p \${DSM_LOG}
$DAEMON_START_COMMAND
$DAEMON_PID_COMMAND
log_end_msg 0
}
stop_tsm()
{
log_begin_msg "Stopping TSM scheduler ..."
start-stop-daemon -Kqop \${PIDFILE} || log_end_msg 1
log_end_msg 0
}
case "\$1" in
start)
start_tsm
;;
stop)
stop_tsm
;;
restart)
stop_tsm
start_tsm
;;
*)
log_success_msg "Usage: /etc/init.d/tsm {start|stop}"
exit 1
esac
exit 0
EOF
#
chmod a+x ${DEB_BUILD}/etc/init.d/tsm
#
#
# DEBIAN control
PREFIX=${SHORT_ORG,,}-${TSM_NAME,,}
DEPENDS="${PREFIX}-ba, ${PREFIX}-crypt, ${PREFIX}-ssl, ${PREFIX}-api"
cat > ${DEB_BUILD}/DEBIAN/control << EOF
Package: ${DEBNAME}
Version: ${TSM_VER}-${DEB_VER}
Architecture: amd64
Depends: ${DEPENDS}
Maintainer: ${EMAIL_MAINTAINER}
Section: non-free/contrib
Priority: extra
Description: ba for ${TSM_NAME} @ ${SHORT_ORG}
Backup Agent for ${TSM_NAME}
TSM stands for Tivoli Storage Manager and it is a solution for backuping is
machine at ${SHORT_ORG}.
EOF
#
#
# DEBIAN postinst
cat > ${DEB_BUILD}/DEBIAN/postinst << 'EOF'
#!/bin/sh
set -e
if [ "$1" = "configure" ]; then
ldconfig
#
# check if there is a valid configuration
if LC_ALL=C dsmc query session > /dev/null 2>&1 ; then
if LC_ALL=C dsmc query schedule 2>&1 | grep "There are no schedules associated with this node" > /dev/null ; then
echo " - tsm configuration is good and planning is disabled"
echo " - if you need a planning, configure it and then"
echo " - update-rc.d tsm defaults"
echo " - invoke-rc.d tsm start"
invoke-rc.d tsm stop > /dev/null
update-rc.d -f tsm remove >/dev/null
else
echo " - tsm configuration is good and planning is enabled"
echo " - enabling the tsm daemon"
update-rc.d tsm defaults >/dev/null
invoke-rc.d tsm start || exit $?
fi
else
echo " - tsm is not configured or the configuration is broken"
echo " - we will not launch the daemon tsm"
echo " - when tsm will be well configured and the schedule planned, do:"
echo " - update-rc.d tsm defaults"
echo " - invoke-rc.d tsm start"
invoke-rc.d tsm stop > /dev/null
update-rc.d -f tsm remove >/dev/null
fi
fi
EOF
#
chmod a+x ${DEB_BUILD}/DEBIAN/postinst
#
#
# DEBIAN postrm
cat > ${DEB_BUILD}/DEBIAN/postrm << EOF
#!/bin/sh
set -e
if [ "$1" = "remove" ]; then
ldconfig
invoke-rc.d tsm stop > /dev/null
update-rc.d tsm remove >/dev/null
fi
EOF
#
chmod a+x ${DEB_BUILD}/DEBIAN/postrm
#
#
# DESKTOP dsmj & dsmc
unzip -p cpio_${drpm[${OBJ}]%.rpm}/opt/tivoli/tsm/client/ba/bin/dsm.jar \
COM/ibm/storage/adsm/cadmin/clientgui/images/dsmwin32.gif \
| convert - ${DEB_BUILD}/usr/share/pixmaps/dsmwin32.png
cat > ${DEB_BUILD}/usr/share/applications/dsmj.desktop << EOF
[Desktop Entry]
Name=dsmj
Comment=This is a backup solution @ UniGE
Exec=tsm
Icon=dsmwin32.png
Terminal=false
Type=Application
Categories=System;
EOF
cat > ${DEB_BUILD}/usr/share/applications/dsmc.desktop << EOF
[Desktop Entry]
Name=dsmc
Comment=This is a backup solution @ UniGE
Exec=dsmc
Icon=dsmwin32.png
Terminal=true
Type=Application
Categories=System;
EOF
#
#
# construct package
fakeroot dpkg -b ${DEB_BUILD}
}
###########################################################
# INTEGRATION
wrap_integration()
{
OBJ=integration
# constructed variable
define_variable
DEB_VER=${ddeb_ver[${OBJ}]}
DEBNAME=${SHORT_ORG,,}-${TSM_NAME,,}-${OBJ}
DEB_BUILD=${TSM_ROOT}/${DEBNAME}_${TSM_VER}-${DEB_VER}
cd ${TSM_ROOT}
[ -d ${DEB_BUILD} ] && rm -fr ${DEB_BUILD}
mkdir -p ${DEB_BUILD}/{etc/tsm,usr/share/pixmaps,usr/share/applications}
mkdir -p ${DEB_BUILD}/{usr/bin,DEBIAN,${OPT_PATH}/bin}
#
#
# GUI NOTIFICATION start
cat > ${DEB_BUILD}/${OPT_PATH}/bin/notify-send-tsm.start << EOF
#!/bin/bash
# 60000 ms= 1min
notify-send -i /usr/share/pixmaps/ubuntu-at-unige.png --expire-time=60000 "Sauvegarde Start" \\
"Lancement de la sauvegarde de votre machine par TSM sur les serveurs de l'UniGE."
EOF
#
chmod a+x ${DEB_BUILD}/${OPT_PATH}/bin/notify-send-tsm.start
#
#
# GUI NOTIFICATION stop
cat > ${DEB_BUILD}/${OPT_PATH}/bin/notify-send-tsm.stop << EOF
#!/bin/bash
# 1800000 ms= 30min
notify-send -i /usr/share/pixmaps/ubuntu-at-unige.png --expire-time=1800000 "Sauvegarde Stop" \\
"La sauvegarde de votre machines par TSM sur les seveurs de l'UniGE a abouti."
EOF
#
chmod a+x ${DEB_BUILD}/${OPT_PATH}/bin/notify-send-tsm.stop
#
#
# TSM CONFIGURE TOOL WRITTEN BY J.-M. NAEF
cat > ${DEB_BUILD}/usr/bin/tsm-configure << EOF
#!/bin/bash
exec javaws "http://sos.unige.ch/eztsm/apps/servlet/jws?ezubuntu"
EOF
#
chmod a+x ${DEB_BUILD}/usr/bin/tsm-configure
#
#
# FIRST SHOOT TSM LAUNCH
cat > ${DEB_BUILD}/usr/bin/tsm << 'EOF'
#!/bin/bash
#
#
[ -f /etc/tsm/dsm.sys -a -f /etc/tsm/dsm.opt ] && exec dsmj
#
#
echo $LANG | grep -q fr
if [ $? -eq 0 ]
then
title="Configurer TSM ?"
text="TSM n'est pas configurer. Nous vous suggérons de lancer \"TSM configure\".\
\n\t- Clic \"Oui\" pour configurer TSM (recommandé).\
\n\t- Clic \"Non\" pour lancer l'application TSM."
else
title="Configure TSM ?"
text="TSM is not yet configured. We suggest you to configure it with the \"TSM configuration\".\
\n\t- Clic \"Yes\" to configure it (recommended).\
\n\t- Clic \"No\" to launch the TSM application."
fi
zenity --title="$title" --question --text="$text"
#
#
if [ $? -eq 0 ]
then
exec tsm-configure
else
exec dsmj
fi
EOF
#
chmod a+x ${DEB_BUILD}/usr/bin/tsm
#
#
# DESKTOP tsm-configure
wget -q -O ${DEB_BUILD}/usr/share/pixmaps/tsm-configure.png http://ubuntu.unige.ch/img/icon/tsm-configure.png
cat > ${DEB_BUILD}/usr/share/applications/tsm-configure.desktop << EOF
[Desktop Entry]
Name=tsm-configure
Comment=Configure TSM the UniGE way
Comment[fr]=Configurer TSM à la sauce UniGE
Exec=tsm-configure
Icon=tsm-configure.png
Terminal=false
Type=Application
Categories=System;ubuntu-at-unige;
EOF
#
#
# DESKTOP tsm
wget -q -O ${DEB_BUILD}/usr/share/pixmaps/tsm.png http://ubuntu.unige.ch/img/icon/tsm.png
cat > ${DEB_BUILD}/usr/share/applications/tsm.desktop << EOF
[Desktop Entry]
Name=tsm
Comment=This is a backup solution @ ${SHORT_ORG}
Exec=tsm
Icon=tsm.png
Terminal=false
Type=Application
Categories=System;ubuntu-at-unige;
EOF
#
#
# DSM.SYS
cat > ${DEB_BUILD}/etc/tsm/dsm.sys.example << EOF
SErvername sos5
COMMMethod TCPip
TCPPort 1505
TCPServeraddress sos5.unige.ch
NODENAME cb10-briner
PASSWORDACCESS generate
SCHEDLOGRetention 7 D
PRENSChedulecmd /${OPT_PATH}/bin/notify-send-tsm.start
POSTNSChedulecmd /${OPT_PATH}/bin/notify-send-tsm.stop
EOF
#
#
# DSM.OPT
cat > ${DEB_BUILD}/etc/tsm/dsm.opt.example << EOF
SErvername sos5
DOMAIN ALL-LOCAL
EOF
#
#
# DEBIAN control
cat > ${DEB_BUILD}/DEBIAN/control << EOF
Package: ${DEBNAME}
Version: ${TSM_VER}-${DEB_VER}
Architecture: amd64
Depends: libnotify-bin, ubuntu-at-unige, zenity, ${SHORT_ORG,,}-${TSM_NAME,,}-ba
Maintainer: ${EMAIL_MAINTAINER}
Section: non-free/contrib
Priority: extra
Description: integration for TSM @ ${SHORT_ORG}
Integration for TSM
TSM stands for Tivoli Storage Manager and it is a solution for backuping is
machine at ${SHORT_ORG}.
EOF
#
#
# construct the package
fakeroot dpkg -b ${DEB_BUILD}
}
###########################################################
# main
#
define_variable
echo "extract RPMs 2 directory with cpio"
echo "=================================="
cd ${TSM_ROOT}
rpm2dir
echo -e "\nlet's rewrap them all"
echo "======================="
echo -e "\nwrap_ssl"
echo "--------"
wrap_ssl
echo -e "\nwrap_crypt"
echo "---------"
wrap_crypt
echo -e "\nwrap_api"
echo "--------"
wrap_api
echo -e "\nwrap_ba"
echo "-------"
wrap_ba
if [[ "$1" == "unige" ]] ; then
# you can comment this without worry, since it is only related for
# the University of Geneva. See the doc on github for more info
echo -e "\nwrap_integration"
echo "----------------"
wrap_integration
fi
echo -e "\ncheck the new package created"
echo "============================="
echo "install packages with: sudo dpkg -i *deb"