summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeyslan G. Bem2017-02-06 20:59:40 -0300
committerGeyslan G. Bem2017-02-06 20:59:40 -0300
commit137f9c9a12ed2956f55f0bd0ba81512c0b95ad0c (patch)
treedc80d1d0fa84b4906da6b2e637ba5ec98ddc63eb
downloadaur-137f9c9a12ed2956f55f0bd0ba81512c0b95ad0c.tar.gz
initial
Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD62
-rw-r--r--pje-office.install14
3 files changed, 94 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8a1cc03eeb24
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = pje-office
+ pkgdesc = PJeOffice is a software made available by CNJ for electronic signing PJe system's documents
+ pkgver = 1.0.8
+ pkgrel = 1
+ url = http://www.cnj.jus.br/wiki/index.php/PJeOffice
+ install = pje-office.install
+ arch = i686
+ arch = x86_64
+ license = BSD
+ makedepends = deb2targz
+ makedepends = coreutils
+ source_i686 = ftp://ftp.cnj.jus.br/pje/programs/pje-office/pje-office_1.0.8_i386.deb
+ md5sums_i686 = c7d3df1069a1f9f12be41659ef4f7be7
+ source_x86_64 = ftp://ftp.cnj.jus.br/pje/programs/pje-office/pje-office_1.0.8_amd64.deb
+ md5sums_x86_64 = f971eba91dfa913b5d7e7c404681ba00
+
+pkgname = pje-office
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2279b81967ae
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,62 @@
+# Maintainer: Geyslan G. Bem <geyslan@gmail.com>
+
+pkgname=pje-office
+pkgver=1.0.8
+pkgrel=1
+pkgdesc="PJeOffice is a software made available by CNJ for electronic signing PJe system's documents"
+arch=('i686' 'x86_64')
+url='http://www.cnj.jus.br/wiki/index.php/PJeOffice'
+license=('BSD')
+makedepends=('deb2targz' 'coreutils')
+source_i686=('ftp://ftp.cnj.jus.br/pje/programs/pje-office/'$pkgname'_'$pkgver'_i386.deb')
+source_x86_64=('ftp://ftp.cnj.jus.br/pje/programs/pje-office/'$pkgname'_'$pkgver'_amd64.deb')
+install='pje-office.install'
+md5sums_i686=('c7d3df1069a1f9f12be41659ef4f7be7')
+md5sums_x86_64=('f971eba91dfa913b5d7e7c404681ba00')
+
+_clean() {
+ echo "- Cleaning up $srcdir"
+ rm -rf ${srcdir}/*
+}
+
+_fix() {
+ local _launcher
+
+ echo "- Fixing launcher"
+ _launcher=usr/share/pje-office/pjeOffice.sh
+ sed -i 's/^DIR=.*/DIR=$( cd "$( dirname $(readlink -f "${BASH_SOURCE[0]}" ) )" \&\& pwd )/' $_launcher
+
+ echo "- Creating symbolic link to /$_launcher"
+ mkdir -p usr/bin
+ ln -s "/$_launcher" usr/bin/pjeOffice
+}
+
+prepare() {
+ local _arch
+ local _filename
+
+ if [[ $CARCH == "i686" ]]; then
+ _srcfile="$(basename $source_i686)"
+ else
+ _srcfile="$(basename $source_x86_64)"
+ fi
+
+ # realpath
+ _srcfile="$(realpath ../$_srcfile)"
+ # remove extension
+ _srcfile="${_srcfile%.*}"
+
+ _clean
+ echo "- Converting deb to tar.xz"
+ deb2targz "$_srcfile.deb"
+
+ echo "- Extracting tar.xz"
+ tar xf "$_srcfile.tar.xz"
+
+ _fix
+}
+
+package() {
+ cp -R usr/ "$pkgdir"
+ chmod 755 "$pkgdir/usr/share/pje-office/pjeOffice.sh"
+}
diff --git a/pje-office.install b/pje-office.install
new file mode 100644
index 000000000000..8c9e45dbdfa8
--- /dev/null
+++ b/pje-office.install
@@ -0,0 +1,14 @@
+## arg 1: the new package version
+post_install() {
+ echo "--"
+ echo " pjeOffice's jsign module attempts to load AET library in /lib"
+ echo " So you may have to create a link under /lib to your AET library, e.g."
+ echo " $ ln -s /usr/lib/libaetpkss.so.3 /lib/libaetpkss.so"
+ echo "--"
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+post_upgrade() {
+ post_install
+}