Readesm

This program takes an ESM file(possible file extensions are .esm, .dd, .tgd or .add), downloaded from a digital tachograph or a driver card (used in the European Union for trucks > 3.5 tons), and converts it into human-readable form, either html or simple plaintext.

Project page http://sourceforge.net/projects/readesm/.

Slackbuild

Run commands:

Content of slack-desc

   1 # HOW TO EDIT THIS FILE:
   2 # The "handy ruler" below makes it easier to edit a package description.  Line
   3 # up the first '|' above the ':' following the base package name, and the '|' on
   4 # the right side marks the last column you can put a character in.  You must make
   5 # exactly 11 lines for the formatting to be correct.  It's also customary to
   6 # leave one space after the ':'.
   7 
   8        |-----handy-ruler------------------------------------------------------|
   9 readesm: readesm - Shows the content of digital tachograph files 
  10 readesm: This program takes an ESM file( file extensions are .esm, .dd, 
  11 readesm: .tgd or .add), downloaded from a digital tachograph or a driver card 
  12 readesm: (used in the European Union for trucks > 3.5 tons), and converts it 
  13 readesm: into human-readable form, either html or simple plaintext.
  14 readesm:
  15 readesm: Homepage: http://readesm.sourceforge.net/
  16 readesm: Homepage: http://sourceforge.net/projects/readesm/
  17 readesm:
  18 readesm:
  19 readesm:

Content of readesm.SlackBuild

   1 #!/bin/sh -e
   2 #V.B. revision date 2013/07/04
   3 #Set initial variables: 
   4 CWD=$(pwd)
   5 if [ "$TMP" = "" ]; then
   6   TMP=/tmp
   7 fi
   8 
   9 # The version which appears in the application's filename
  10 VERSION=2011.12pre1-Source
  11 # If the version conflicts with the Slackware package standard
  12 # The dash character ("-") is not allowed in the VERSION string
  13 # You can set the PKG_VERSION to something else than VERSION
  14 # PKG_VERSION cannot have '-' in it since the package name is composed by $APPNAME-$PKG_VERSION-$ARCH-$BUILD.tgz
  15 PKG_VERSION=2011.12pre1 # the version which appears in the package name. 
  16 #ARCH=${ARCH:-i486} # the architecture on which you want to build your package   
  17 # Automatically determine the architecture we're building on:
  18 if [ -z "$ARCH" ]; then
  19   case "$( uname -m )" in
  20     i?86) ARCH=i486 ;;
  21     arm*) ARCH=arm ;;
  22     # Unless $ARCH is already set, use uname -m for all other archs:
  23        *) ARCH=$( uname -m ) ;;
  24   esac
  25 fi
  26 # First digit is the build number, which specifies how many times it has been built.    
  27 # Second string is the short form of the authors name, typical three initials:w
  28 BUILD=${BUILD:-1_SBo}
  29 # The application's name
  30 APP=readesm
  31 # The installation directory of the package (where its actual directory
  32 # structure will be created) 
  33 PKG=$TMP/package-$APP
  34 
  35 if [ "$ARCH" = "i486" ]; then
  36   SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  37  elif [ "$ARCH" = "x86_64" ]; then
  38   SLKCFLAGS="-O2 -fPIC"
  39 fi
  40 
  41 # Delete the leftover directories if they exist (due to a previous build)
  42 # and (re)create the packaging directory
  43 rm -rf $PKG 
  44 mkdir -p $TMP $PKG
  45 rm -rf $TMP/$APP-$VERSION
  46 
  47 # Change to the TMP directory
  48 cd $TMP || exit 1
  49  
  50 # Extract the application source in TMP
  51 # Note: if your application comes as a tar.bz2, you need tar -jxvf
  52 tar -xvif $CWD/$APP-$VERSION.tar.bz2 || exit 1
  53 
  54 # Change to the application source directory
  55 cd $APP-$VERSION || exit 1
  56  
  57 # Change ownership and permissions if necessary
  58 # This may not be needed in some source tarballs, but it never hurts
  59 chown -R root:root .
  60 chmod -R u+w,go+r-w,a-s .
  61 
  62 # buils Unix makefiles
  63 cmake -G 'Unix Makefiles'
  64 
  65 echo 'Patching some source files as stated in http://sourceforge.net/p/readesm/bugs/2/'
  66 sed -i 's/Block11Record.h/block11Record.h/g' ./fileformat/DataTypes/block11Record.cpp 
  67 sed -i 's/Block11.h/block11.h/g' ./fileformat/VuBlocks/block11.cpp 
  68 sed -i 's/Block11Record.h/block11Record.h/g' ./fileformat/VuBlocks/block11.h 
  69 sed -i 's/Block13.h/block13.h/g' ./fileformat/VuBlocks/block13.cpp 
  70 sed -i 's/Block11Record.h/block11Record.h/g' ./fileformat/VuBlocks/block13.h 
  71 sed -i 's/Block13.h/block13.h/g' ./fileformat/VuBlocks/vuBlockFactory.cpp 
  72 sed -i 's/Block11.h/block11.h/g' ./fileformat/VuBlocks/vuBlockFactory.cpp 
  73 
  74 # clean the source, but exit if anything goes wrong
  75 make clean || exit
  76 
  77 # compile the source, but exit if anything goes wrong
  78 make || exit
  79  
  80 # Install everything into the package directory, but exit if anything goes wrong
  81 make install DESTDIR=$PKG || exit
  82 
  83 # Create a directory for documentation
  84 mkdir -p $PKG/usr/doc/$APP-$VERSION
  85 
  86 # Copy documentation to the docs directory and fix permissions
  87 cp -a COPYING CHANGELOG README $PKG/usr/doc/$APP-$VERSION
  88 find $PKG/usr/doc/$APP-$VERSION -type f -exec chmod 644 {} \;
  89 # slackbuild copy
  90 cat $CWD/$APP.SlackBuild > $PKG/usr/doc/$APP-$VERSION/$APP.SlackBuild
  91 
  92 echo "Create the ./install directory and copy the slack-desc into it"
  93 mkdir -p $PKG/install
  94 cat $CWD/slack-desc > $PKG/install/slack-desc
  95 
  96 echo "Add doinst.sh to package (if it exists)"
  97 if [ -e $CWD/doinst.sh.gz ]; then
  98   zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
  99 fi
 100 
 101 echo "Compress man pages if they exist"
 102 if [ -d $PKG/usr/man ]; then
 103   ( cd $PKG/usr/man
 104   find . -type f -exec gzip -9 {} \;
 105   for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
 106   ) 
 107 fi
 108 
 109 echo "Compress info pages if they exist (and remove the dir file)"
 110 if [ -d $PKG/usr/info ]; then
 111   gzip -9 $PKG/usr/info/*.info
 112   rm -f $PKG/usr/info/dir
 113 fi
 114 
 115 echo "Build the package"
 116 cd $PKG
 117 /sbin/makepkg -l y -c n $TMP/$APP-$PKG_VERSION-$ARCH-$BUILD.tgz

To show help on the readesm app

   1 sed -i 's/view->load(QUrl("bla/\/\/view->load(QUrl("bla/g' gui/mainWindow.cpp

Slackware 14 package: readesm-2011.12pre1-i486-1_SBo.tgz

Slackware64 14 package: readesm-2011.12pre1-x86_64-1_SBo.tgz

Install from slackbuild

   1 cd /tmp/
   2 wget https://slackbuilds.org/slackbuilds/14.2/misc/readesm.tar.gz
   3 tar xvzf readesm.tar.gz 
   4 cd readesm
   5 wget https://downloads.sourceforge.net/readesm/readesm-2011.12pre1-Source.tar.bz2
   6 ./readesm.SlackBuild 
   7 installpkg /tmp/readesm-2011.12pre1-i486-1_SBo.tgz

Readesm (last edited 2019-11-21 21:03:12 by localhost)