updated on Mon Jan 16 00:01:41 UTC 2012
[aur-mirror.git] / ausweisapp / PKGBUILD
blob59002996ffef34620215eea34dd75103d4510c30
1 # Maintainer: onny <onny@project-insanity.org>
2 # Contributor: onny <onny@project-insanity.org>
4 pkgname=ausweisapp
5 pkgver=1.6.0
6 pkgrel=1
7 pkgdesc="A tool from the BSI for secure payment and authentication on the internet using the rfid passport (sic!)"
8 arch=('i686' 'x86_64')
9 url="https://www.ausweisapp.bund.de/pweb/index.do"
10 depens=('pcscd' 'firefox' 'evince')
11 license=('unknown')
12 makedepends=('binutils')
13 DOWNLOAD=`curl -s https://www.ausweisapp.bund.de/pweb/filedownload/download_pre.do | grep "Debian.zip" | awk '{print $3}' | cut -d'"' -f2`
14 source=($DOWNLOAD)
15 md5sums=("f1d9570fe3d88aa33fc4c649fe32b294")
17 build() {
18         cd $srcdir
19         ar x AusweisApp_010600_i686.deb
20         tar xvf data.tar.bz2
21         ar x AusweisApp_IntegrityTool_010600_i686.deb
22         tar xvf data.tar.bz2
23
24 package () {
25         cp -R opt $pkgdir
26         cp -R usr $pkgdir
27         chmod 755 $pkgdir/opt/olsc/AusweisApp/siqBootLoaderIT
28         chmod 755 $pkgdir/opt/olsc/AusweisApp/it.sh
29         chmod -R 755 $pkgdir/opt/olsc/AusweisApp/extit
30         chmod 755 $pkgdir/opt/olsc/AusweisApp
31         chmod 755 $pkgdir/opt/olsc/AusweisApp/siqBootLoader
32         chmod 755 $pkgdir/opt/olsc/AusweisApp/siqBootLoaderAC
33         chmod 755 $pkgdir/opt/olsc/AusweisApp/ac.sh
34         chmod -R 755 $pkgdir/opt/olsc/AusweisApp/bc.sh
35         chmod -R 755 $pkgdir/opt/olsc/AusweisApp/ext
36         chmod -R 755 $pkgdir/opt/olsc/AusweisApp/extac
37         chmod -R 755 $pkgdir/opt/olsc/AusweisApp/documentation
38         chmod -R 755 $pkgdir/opt/olsc/AusweisApp/Images
39         chmod -R 755 $pkgdir/opt/olsc/AusweisApp/jvm
40         chmod -R 755 $pkgdir/opt/olsc/AusweisApp/CIFs
41         chmod -R 755 $pkgdir/opt/olsc/AusweisApp/mozilla
42         chmod -R 755 $pkgdir/opt/olsc/AusweisApp/Data
43         chmod +w $pkgdir/opt/olsc/AusweisApp/siqNetwork.cfg
45         #######################################
46         #PdfTools hooks old variant
47         ######################################
49         if [ -e $pkgdir/opt/olsc/AusweisApp/libPdfSecureAPI.so ] ; then
50           if [ ! -L $pkgdir/opt/olsc/AusweisApp/PdfSecureAPI.dll ] ; then
51            ln -s $pkgdir/opt/olsc/AusweisApp/libPdfSecureAPI.so  $pkgdir/opt/olsc/AusweisApp/PdfSecureAPI.dll
52           fi
53         fi
55         if [ -e $pkgdir/opt/olsc/AusweisApp/libPdfViewerAPI.so ] ; then
56           if [ ! -L $pkgdir/opt/olsc/AusweisApp/PdfViewerAPI.dll ] ; then
57            ln -s $pkgdir/opt/olsc/AusweisApp/libPdfViewerAPI.so  $pkgdir/opt/olsc/AusweisApp/PdfViewerAPI.dll
58           fi
59         fi
61         if [ -e $pkgdir/opt/olsc/AusweisApp/libPdfValidatorAPI.so ] ; then
62            if [ ! -L $pkgdir/opt/olsc/AusweisApp/PdfValidatorAPI.dll ] ; then
63             ln -s $pkgdir/opt/olsc/AusweisApp/libPdfValidatorAPI.so  $pkgdir/opt/olsc/AusweisApp/PdfValidatorAPI.dll
64            fi
65         fi
67         if [ -e $pkgdir/opt/olsc/AusweisApp/libPDFParser.so ] ; then
68           if [ ! -L $pkgdir/opt/olsc/AusweisApp/PDFParser.dll ] ; then
69            ln -s $pkgdir/opt/olsc/AusweisApp/libPDFParser.so $pkgdir/opt/olsc/AusweisApp/PDFParser.dll
70           fi
71         fi
73         ########################################
74         #linking plug-ins
75         ########################################
77         # justify the firefox version to a 2 digit integer
78         # so that the version match can be executed 
79         # point of interest is major and minor versions
80         #FFVERS=`firefox -v | awk {'print $3'} | sed -e 's/\([0-9]\)\.\([0-9]\).*/\1\2/'`
82               #Plugins
83         ###      if [ -e $pkgdir/opt/olsc/AusweisApp/libsiqeCardClient30.so ] ; then
84         ###       if [ -e /usr/lib/firefox-addons/plugins ] ; then
85         ###              if [ ! -L /usr/lib/firefox-addons/plugins/libsiqeCardClient-plugin.so ] ; then
86         ###                ln -s $pkgdir/opt/olsc/AusweisApp/libsiqeCardClient30.so /usr/lib/firefox-addons/plugins/libsiqeCardClient-plugin.so
87         ###              fi
88         ###          fi
89          ###         # debian stuff - iceweasel
90         ###          if [ -e /usr/lib/mozilla/plugins ] ; then
91         ###                if [ ! -L /usr/lib/mozilla/plugins/libsiqeCardClient-plugin.so ] ; then
92         ###               ln -s $pkgdir/opt/olsc/AusweisApp/libsiqeCardClient30.so /usr/lib/mozilla/plugins/libsiqeCardClient-plugin.so
93         ###                fi
94         ###              else
95         ###              if [ -e /usr/lib/xulrunner-1.9/plugins ] ; then
96         ###                if [ ! -L /usr/lib/xulrunner-1.9/plugins/libsiqeCardClient-plugin.so ] ; then
97         ###                     ln -s $pkgdir/opt/olsc/AusweisApp/libsiqeCardClient30.so /usr/lib/xulrunner-1.9/plugins/libsiqeCardClient-plugin.so
98         ###                fi
99         ###              fi 
100         ###          fi
101         ###        fi
103         if [ ! -e /usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384} ] ; then
104            mkdir -p $pkgdir/usr/share/mozilla/extensions/\{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
105         fi
106         # register FF extension
107              
108         # for Update 1.3 to 1.4
109         # cleanup the old links if they are there...
110         # old plugins used to have a link to dir
111         # this used to show to dir eCardClientext_FFxx_Lin32
112         if [ -L /usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{4F3D26C8-9907-48ff-BC74-B8C572D317BF} ] ; then
113           rm /usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{4F3D26C8-9907-48ff-BC74-B8C572D317BF}
114         fi
116         ln -s $pkgdir/opt/olsc/AusweisApp/mozilla/eCardClientExt_FFxx_Lin $pkgdir/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{4F3D26C8-9907-48ff-BC74-B8C572D317BF}
118         #            if [ $FFVERS -ge 40 ] ; then
119         #             # ff 4.0.x   
120         #                ln -s $pkgdir/opt/olsc/AusweisApp/mozilla/eCardClientExt_FF40_Lin32 /usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{4F3D26C8-9907-48ff-BC74-B8C572D317BF}
121         #               else
122         #            # ff 3.x
123         #                ln -s $pkgdir/opt/olsc/AusweisApp/mozilla/eCardClientExt_FF3x_Lin32 /usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{4F3D26C8-9907-48ff-BC74-B8C572D317BF}
124         #           fi  
126         if [ ! -L /usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{4F0963A3-1658-4fde-9585-23A25CC288BF} ] ; then
127              ln -s $pkgdir/opt/olsc/AusweisApp/mozilla/eCardClientPIn_FFxx_Lin $pkgdir/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{4F0963A3-1658-4fde-9585-23A25CC288BF}
128         fi
130         ########################################
131         #linking pcsclite
132         ########################################
134         if [ ! -L $pkgdir/opt/olsc/AusweisApp/libpcsclite.so ] ; then
135         if [ -e  $pkgdir/opt/olsc/pcsc/lib/libpcsclite.so.1.0.0 ] ; then
136            ln -s $pkgdir/opt/olsc/pcsc/lib/libpcsclite.so.1.0.0 $pkgdir/opt/olsc/AusweisApp/libpcsclite.so
138                 else
140                 if [ -e /lib/libpcsclite.so.1.0.0 ] ; then
141                         ln -s /lib/libpcsclite.so.1.0.0 $pkgdir/opt/olsc/AusweisApp/libpcsclite.so
142                 fi
143                 if [ -e /usr/lib/libpcsclite.so.1.0.0 ] ; then
144                         ln -s /usr/lib/libpcsclite.so.1.0.0 $pkgdir/opt/olsc/AusweisApp/libpcsclite.so
145                 fi
146         fi
147         fi
149         chown root:root $pkgdir/usr/share/menu/ausweisapp
150         chmod 644 $pkgdir/usr/share/menu/ausweisapp
151         chown root:root $pkgdir/usr/share/pixmaps/ausweisapp.png
152         chmod 644 $pkgdir/usr/share/pixmaps/ausweisapp.png
153         chown root:root $pkgdir/usr/share/applications/configure_ausweisapp.desktop
154         chmod 644  $pkgdir/usr/share/applications/configure_ausweisapp.desktop
155         chown root:root $pkgdir/usr/share/applications/ausweisapp.desktop
156         chmod 644 $pkgdir/usr/share/applications/ausweisapp.desktop
158         chown -R root:root $pkgdir/opt/olsc/AusweisApp