BISP.SlackBuild 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. #!/bin/bash
  2. # Slackware build script for Nexus Personal (BISP)
  3. #
  4. # Copyright 2009 Niklas "Nille" Åkerström
  5. # All rights reserved.
  6. #
  7. # Redistribution and use of this script, with or without modification, is
  8. # permitted provided that the following conditions are met:
  9. #
  10. # 1. Redistributions of this script must retain the above copyright
  11. # notice, this list of conditions and the following disclaimer.
  12. #
  13. # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
  14. # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  15. # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
  16. # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  18. # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  19. # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  20. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  21. # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  22. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  23. #
  24. ###################################################
  25. #
  26. # Changed and maintaned by Minime e-mail: i_am_minime_2003@hotmail.com
  27. #
  28. # Changelog:
  29. # 4.10.0.x 27/Mar/2009 by Minime <i_am_minime_2003@hotmail.com>
  30. # * Fist attemt to make personal work in Slackware.
  31. # This was not a script to start with.
  32. # Just made a guide on wiki.slackware.se that "Damaged"
  33. # the Slackware install.
  34. # 4.10.0.x 28/Mar/2009 by Niklas "Nille" Åkerström.
  35. # * First full working Slackware buildscript.
  36. # Buildscript needed "Compatlibs" from Ubuntu.
  37. # 4.10.0.x 11/May/2009 by Niklas "Nille" Åkerström.
  38. # * Corrected some rights settings in the buildscript.
  39. # 4.10.2.16 01/Jan/2010
  40. # * Removed the "Compatlibs" and made some minor changes to the
  41. # Buildscript so the new version of Nexus Personal would install correctly.
  42. # * Added a browser plugin patch so Nexus personal works
  43. # with FireFox 2.x, FireFox 3.x and Seamonkey.
  44. # The patch puts the libplugin for nexus personal
  45. # in /usr/lib/mozilla/plugins
  46. # 4.15.0.14 05/Jun/2010 by Minime.
  47. # * Changed script to work with the new version.
  48. # * Updated browser plugin patch.
  49. # 4.17.0.11 06/Mar/2011 by Minime.
  50. # * Changed script to work with the new version.
  51. # * Updated browser plugin patch.
  52. # 4.18.0.10751 21/Jun/2011 by Minime.
  53. # * Updated browser plugin patch.
  54. # 4.18.1.10899 30/Jun/2011
  55. # * Updated browser plugin patch.
  56. # * Fixed path to .mo (Lang file) file as this was changed.
  57. # * Fixed some other minor changes to this script
  58. # 4.19.1.11663 1/Nov/2012
  59. # * Updated browser plugin patch.
  60. ##################################################
  61. cd $(dirname $0) ; CWD=$(pwd)
  62. PRGNAM=BISP
  63. VERSION=${VERSION:-4.19.1.11663}
  64. ARCH=${ARCH:-i586}
  65. BUILD=${BUILD:-1}
  66. TAG=${TAG:-_SBo}
  67. PKGTYPE=${PKGTYPE:-tgz}
  68. # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
  69. # the name of the created package would be, and then exit. This information
  70. # could be useful to other scripts.
  71. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  72. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  73. exit 0
  74. fi
  75. TMP=${TMP:-/tmp/SBo}
  76. PKG=$TMP/package-$PRGNAM
  77. OUTPUT=${OUTPUT:-/tmp}
  78. PREFIX="/usr"
  79. set -e
  80. rm -rf $PKG
  81. mkdir -p $TMP $PKG $OUTPUT
  82. cd $TMP
  83. rm -rf $PRGNAM-$VERSION
  84. tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
  85. cd $PRGNAM-$VERSION
  86. chown -R root:root .
  87. find -L . \
  88. \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  89. -exec chmod 755 {} \; -o \
  90. \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  91. -exec chmod 644 {} \;
  92. zcat $CWD/BISP.browser.patch.gz | patch -p1 --verbose --backup --suffix=.orig
  93. mkdir -p $PKG/$PREFIX/lib/personal/{config,icons,lang/sv_SE}
  94. mkdir -p $PKG/usr/share/applications/
  95. mkdir -p $PKG/$PREFIX/bin
  96. mkdir -p $PKG/usr/lib/mozilla/plugins
  97. cd $TMP/$PRGNAM-$VERSION
  98. cp -a {install.*.sh,libBranding.so,libCardPrisma.so,libCardSetec.so,libCardSiemens.so,libP11.so,persadm,persadm.sh,personal.bin} $PKG/$PREFIX/lib/personal/
  99. cp Personal.cfg $PKG/$PREFIX/lib/personal/config/
  100. cp "nexus_logo_32x32.png" $PKG/$PREFIX/lib/personal/icons
  101. cp $TMP/lang/sv_SE/personal.mo $PKG/$PREFIX/lib/personal/lang/sv_SE
  102. cp personal.desktop $PKG/usr/share/applications/
  103. cp {libai.so,libtokenapi.so} $PKG/$PREFIX/lib/
  104. cp personal.sh $PKG/$PREFIX/bin/personal
  105. cp persadm.sh $PKG/$PREFIX/bin/persadm
  106. cp libplugins.so $PKG/usr/lib/mozilla/plugins/
  107. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  108. cp -a BankID_Security_Application_Help_EN_US.htm BankID_Security_Application_Help_SV_SE.htm BankIDUbuntu_ReadMe_EN_US.txt \
  109. BankIDUbuntu_ReadMe_SV_SE.txt \
  110. $PKG/usr/doc/$PRGNAM-$VERSION
  111. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  112. mkdir -p $PKG/install
  113. cat $CWD/slack-desc > $PKG/install/slack-desc
  114. cat $CWD/doinst.sh > $PKG/install/doinst.sh
  115. cd $PKG
  116. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE