root/middleware-offline/trunk/_src/eidmw/preparePKG.sh @ 82

Revision 82, 6.7 KB (checked in by vsilva, 9 years ago)

Implement Multi-sign with no PIN request

  • Property svn:executable set to *
Line 
1#!/bin/bash
2
3rm -rf pteid-pkg
4mkdir pteid-pkg
5
6mkdir -p pteid-pkg/lib
7mkdir -p pteid-pkg/bin
8mkdir -p pteid-pkg/eidgui
9mkdir -p pteid-pkg/jar
10mkdir -p pteid-pkg/misc/certs/
11
12cp -r lib/*                     pteid-pkg/lib/
13cp -r bin/*                     pteid-pkg/bin/
14cp -r eidgui/*.qm               pteid-pkg/eidgui/
15cp -r jar/pteidlibJava.jar      pteid-pkg/jar/
16cp misc/certs/*.der             pteid-pkg/misc/certs/
17
18echo "#!/bin/bash" > pteid-pkg/install_pteid.sh
19
20echo "echo \"Este script instala a aplicação do cartão de cidadao\"" >> pteid-pkg/install_pteid.sh
21echo "uid=\`id -u\`"  >> pteid-pkg/install_pteid.sh
22echo "if [ \$uid -eq 0 ]"  >> pteid-pkg/install_pteid.sh
23echo "then"  >> pteid-pkg/install_pteid.sh
24
25
26# Add Certs
27list_of_files=`find misc/certs/ -name "*.der"`
28for file in $list_of_files;
29do
30        echo "  install -m 755 -p \"$file\" \"/usr/local/share/certs\"" >> pteid-pkg/install_pteid.sh
31done
32
33echo "  install -m 755 -p \"lib/libpteidpp2-gempc.so\" \"/usr/local/lib/pteidpp/libpteidpp2-gempc.so\"" >> pteid-pkg/install_pteid.sh
34
35echo "  install -m 755 -p \"lib/libfreeimagePTEiD-3.15.1.so\" \"/usr/local/lib/libfreeimagePTEiD-3.15.1.so\"" >> pteid-pkg/install_pteid.sh
36echo "  ln -f -s /usr/local/lib/libfreeimagePTEiD-3.15.1.so /usr/local/lib/libfreeimagePTEiD.so"  >> pteid-pkg/install_pteid.sh
37echo "  ln -f -s /usr/local/lib/libfreeimagePTEiD-3.15.1.so /usr/local/lib/libfreeimagePTEiD.so.3"  >> pteid-pkg/install_pteid.sh
38
39echo "  install -m 755 -p \"lib/libpteidcommon.so.2.0.0\" \"/usr/local/lib/libpteidcommon.so.2.0.0\"" >> pteid-pkg/install_pteid.sh
40echo "  ln -f -s /usr/local/lib/libpteidcommon.so.2.0.0 /usr/local/lib/libpteidcommon.so"  >> pteid-pkg/install_pteid.sh
41echo "  ln -f -s /usr/local/lib/libpteidcommon.so.2.0.0 /usr/local/lib/libpteidcommon.so.2"  >> pteid-pkg/install_pteid.sh
42echo "  ln -f -s /usr/local/lib/libpteidcommon.so.2.0.0 /usr/local/lib/libpteidcommon.so.2.0"  >> pteid-pkg/install_pteid.sh
43
44echo "  install -m 755 -p \"lib/libpteiddialogsQT.so.2.0.0\" \"/usr/local/lib/libpteiddialogsQT.so.2.0.0\""  >> pteid-pkg/install_pteid.sh
45echo "  ln -s -f /usr/local/lib/libpteiddialogsQT.so.2.0.0 /usr/local/lib/libpteiddialogsQT.so"  >> pteid-pkg/install_pteid.sh 
46echo "  ln -s -f /usr/local/lib/libpteiddialogsQT.so.2.0.0 /usr/local/lib/libpteiddialogsQT.so.2"  >> pteid-pkg/install_pteid.sh
47echo "  ln -s -f /usr/local/lib/libpteiddialogsQT.so.2.0.0 /usr/local/lib/libpteiddialogsQT.so.2.0"  >> pteid-pkg/install_pteid.sh
48
49
50echo "  install -m 755 -p \"bin/pteiddialogsQTsrv\" \"/usr/local/bin/pteiddialogsQTsrv\""  >> pteid-pkg/install_pteid.sh
51
52echo "  install -m 755 -p \"lib/libpteidcardlayer.so.2.0.0\" \"/usr/local/lib/libpteidcardlayer.so.2.0.0\""  >> pteid-pkg/install_pteid.sh
53echo "  ln -s -f /usr/local/lib/libpteidcardlayer.so.2.0.0 /usr/local/lib/libpteidcardlayer.so"  >> pteid-pkg/install_pteid.sh
54echo "  ln -s -f /usr/local/lib/libpteidcardlayer.so.2.0.0 /usr/local/lib/libpteidcardlayer.so.2"  >> pteid-pkg/install_pteid.sh
55echo "  ln -s -f /usr/local/lib/libpteidcardlayer.so.2.0.0 /usr/local/lib/libpteidcardlayer.so.2.0"  >> pteid-pkg/install_pteid.sh
56
57echo "  install -m 755 -p \"lib/libcardpluginPteid.so.2.0.0\" \"/usr/local/lib/libcardpluginPteid.so.2.0.0\""  >> pteid-pkg/install_pteid.sh
58echo "  ln -s -f /usr/local/lib/libcardpluginPteid.so.2.0.0 /usr/local/lib/libcardpluginPteid.so"  >> pteid-pkg/install_pteid.sh
59echo "  ln -s -f /usr/local/lib/libcardpluginPteid.so.2.0.0 /usr/local/lib/libcardpluginPteid.so.2"  >> pteid-pkg/install_pteid.sh
60echo "  ln -s -f /usr/local/lib/libcardpluginPteid.so.2.0.0 /usr/local/lib/libcardpluginPteid.so.2.0"  >> pteid-pkg/install_pteid.sh
61
62echo "  install -m 755 -p \"lib/libpteidpkcs11.so.2.0.0\" \"/usr/local/lib/libpteidpkcs11.2.0.0\""  >> pteid-pkg/install_pteid.sh
63echo "  ln -s -f /usr/local/lib/libpteidpkcs11.so.2.0.0 /usr/local/lib/libpteidpkcs11.so"  >> pteid-pkg/install_pteid.sh
64echo "  ln -s -f /usr/local/lib/libpteidpkcs11.so.2.0.0 /usr/local/lib/libpteidpkcs11.so.2"  >> pteid-pkg/install_pteid.sh
65echo "  ln -s -f /usr/local/lib/libpteidpkcs11.so.2.0.0 /usr/local/lib/libpteidpkcs11.so.2.0"  >> pteid-pkg/install_pteid.sh
66
67echo "  install -m 755 -p \"lib/libpteidapplayer.so.2.0.0\" \"/usr/local/lib/libpteidapplayer.2.0.0\""  >> pteid-pkg/install_pteid.sh
68echo "  ln -s -f /usr/local/lib/libpteidapplayer.so.2.0.0 /usr/local/lib/libpteidapplayer.so"  >> pteid-pkg/install_pteid.sh
69echo "  ln -s -f /usr/local/lib/libpteidapplayer.so.2.0.0 /usr/local/lib/libpteidapplayer.so.2"  >> pteid-pkg/install_pteid.sh
70echo "  ln -s -f /usr/local/lib/libpteidapplayer.so.2.0.0 /usr/local/lib/libpteidapplayer.so.2.0"  >> pteid-pkg/install_pteid.sh
71
72echo "  install -m 755 -p \"lib/libpteidlib.so.2.0.0\" \"/usr/local/lib/libpteidlib.2.0.0\""  >> pteid-pkg/install_pteid.sh
73echo "  ln -s -f /usr/local/lib/libpteidlib.so.2.0.0 /usr/local/lib/libpteidlib.so"  >> pteid-pkg/install_pteid.sh
74echo "  ln -s -f /usr/local/lib/libpteidlib.so.2.0.0 /usr/local/lib/libpteidlib.so.2"  >> pteid-pkg/install_pteid.sh
75echo "  ln -s -f /usr/local/lib/libpteidlib.so.2.0.0 /usr/local/lib/libpteidlib.so.2.0"  >> pteid-pkg/install_pteid.sh
76
77echo "  install -m 755 -p \"lib/libpteidlibJava_Wrapper.so.2.0.0\" \"/usr/local/lib/libpteidlibJava_Wrapper.so.2.0.0\""  >> pteid-pkg/install_pteid.sh
78echo "  ln -s -f /usr/local/lib/libpteidlibJava_Wrapper.so.2.0.0 /usr/local/lib/libpteidlibJava_Wrapper.so"  >> pteid-pkg/install_pteid.sh
79echo "  ln -s -f /usr/local/lib/libpteidlibJava_Wrapper.so.2.0.0 /usr/local/lib/libpteidlibJava_Wrapper.so.2"  >> pteid-pkg/install_pteid.sh
80echo "  ln -s -f /usr/local/lib/libpteidlibJava_Wrapper.so.2.0.0 /usr/local/lib/libpteidlibJava_Wrapper.so.2.0"  >> pteid-pkg/install_pteid.sh
81
82
83echo "  install -m 755 -p \"jar/pteidlibJava.jar\" \"/usr/local/lib/pteid_jni/\""  >> pteid-pkg/install_pteid.sh
84
85
86echo "  install -m 755 -p \"bin/pteidgui\" \"/usr/local/bin/pteidgui\""  >> pteid-pkg/install_pteid.sh
87echo ""  >> pteid-pkg/install_pteid.sh
88echo "  install -m 644 -p \"eidgui/eidmw_de.qm\" \"/usr/local/bin/\""  >> pteid-pkg/install_pteid.sh
89echo "  install -m 644 -p \"eidgui/eidmw_en.qm\" \"/usr/local/bin/\""  >> pteid-pkg/install_pteid.sh
90echo "  install -m 644 -p \"eidgui/eidmw_fr.qm\" \"/usr/local/bin/\""  >> pteid-pkg/install_pteid.sh
91echo "  install -m 644 -p \"eidgui/eidmw_nl.qm\" \"/usr/local/bin/\""  >> pteid-pkg/install_pteid.sh
92
93
94
95echo "  echo \"Instalação bem sucedida!\"" >> pteid-pkg/install_pteid.sh
96echo "  echo \"Pode agora executar a aplicação a partir do comando pteidgui\"" >> pteid-pkg/install_pteid.sh
97
98echo "else" >> pteid-pkg/install_pteid.sh
99echo "  echo \"Nao tem permissoes de instalacao! Necessita de permissoes de super-utilizador para instalar o software.\"" >> pteid-pkg/install_pteid.sh
100echo "  echo \"Instalação cancelada!\"" >> pteid-pkg/install_pteid.sh
101echo "fi" >> pteid-pkg/install_pteid.sh
102
103
104
105chmod +x pteid-pkg/install_pteid.sh
106tar czvf pteid-pkg.tar.gz pteid-pkg/
Note: See TracBrowser for help on using the browser.