You are not logged in.

#1 2013-08-10 01:34:30

boina
Member
From: Barcelona - Spain
Registered: 2011-06-05
Posts: 46

[SOLVED] ActivInspire PKGBUILD Help

I'm trying to generate a PKGBUILD to install ActivInspire software. Following installing  instructions (http://www1.prometheanplanet.com/forum/ … php?t=8394) I manged to prepare this PKGBUILD:

pkgname=activinspire_no_hwr
pkgver=1.6.43277
pkgrel=1
pkgdesc="ActivInspire is the new teaching and learning software from Promethean for computers
and interactive whiteboards."
arch=('any')
url="http://www.prometheanworld.com/us/english/education/products/classroom-software/activinspire/"
license=('Custom: Personal License')
depends=('lib32-libxmu' 'lib32-libjpeg6')
install=${pkgname}.install
source=("http://www.activsoftware.co.uk/linux/$pkgname.tar.gz")
md5sums=('adad63ea38b92a675abb1122df78647d')
noextract=("$pkgname.tar.gz")

package() {
  tar -xvpf $pkgname.tar.gz
  cd "${srcdir}/inspire"
  DESTDIR="$pkgdir" ./install.sh

}

The problem is that this script creates an empty package. While creating the package makepkg complains about copying permissions:

cp: no se puede crear el fichero regular «/usr/local/bin/activsoftware/translations/inspire.en_US.qm»: Permiso denegado
cp: no se puede crear el fichero regular «/usr/local/bin/activsoftware/translations/eula.eu.txt»: Permiso denegado
cp: no se puede crear el fichero regular «/usr/local/bin/activsoftware/translations/qt.ja.qm»: Permiso denegado

I have no idea what I'm doing wrong. Any help??
Thanks in advanced, Jose.

Last edited by boina (2013-08-10 15:26:49)

Offline

#2 2013-08-10 02:06:06

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: [SOLVED] ActivInspire PKGBUILD Help

1. Choose a better title.
2. Use English LC when posting errors.
3. Does install.sh even use DESTDIR? Looks like you might have to look at install.sh itself and figure out what its doing, probably hard coded the location of its files.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2013-08-10 02:32:16

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,441
Website

Re: [SOLVED] ActivInspire PKGBUILD Help

You shouldn't untar the source file - makepkg does that.  And arch should only be i686 according to the website you linked.

EDIT: I just downloaded that ... little shop of horror installs.  To work at all, you'd have to `cp -r` from the sourcedir to the pkgdir, then run the install script within the pkgdir.  Then in order to work smoothly, you'd have to further rearrange many files and directories under pkgdir separately.  The installer doesn't use DESTDIR, nor anything like it, but it does use a "ROOTDIR" which it sets as the current path to wherever the script is (`dirname $0`).  Everything is then installed relative to this location, and there is even a chmod -R root.root run on that location.  Anyone who downloaded that installer to their home directory then tried to run it would have quite a mess to clean up!

Last edited by Trilby (2013-08-10 02:49:42)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2013-08-10 15:25:28

boina
Member
From: Barcelona - Spain
Registered: 2011-06-05
Posts: 46

Re: [SOLVED] ActivInspire PKGBUILD Help

OK guys, got it. I don't even want it installed after reading your comments. This program is supposed to be used at work and they gave us the serial number to prepare classes at home if we wanted.
I will have to clean the mess because I did run the install script.
Thanks, Jose.

Offline

#5 2013-11-08 16:22:46

Carl Karl
Member
Registered: 2013-06-12
Posts: 231

Re: [SOLVED] ActivInspire PKGBUILD Help

[edit3]All PKGBUILDs are in the AUR now:
activinspire

activtools
activdriver[/edit3]

old post:


I'm interested in the same thing and managed to create some PKGBUILDs which at least work for me.

You can download them together with detailed installation instructions and information about known issues (see file "information.txt") here:

[edit]skip to most recent version[/edit]
[edit2]Archives updated - both are the same as they are for both architectures now.[/edit2]

For 32Bit download here.
For 64Bit download here.

It's an archive, because it contains 3 PKGBUILDs (for activinspire, activtools and activdriver) and activdriver (which is in a broken version in the AUR, too, the archives here contains a fixed version) needs two extra files.

Last edited by Carl Karl (2014-01-24 02:30:09)

Offline

#6 2013-11-08 17:58:05

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: [SOLVED] ActivInspire PKGBUILD Help

I just took a quick look and there are some issues.

PKGBUILDS should never use /usr/local

Instead of moving to $pkgdir, extracting, then removing, why not just extract to $pkgdir:

bsdtar -xf data.tar.gz -C "$pkgdir"

The i686 versions are looking for a lib32 dir? What?

Some uses of $pkgdir are quoted and some aren't.

Why cp a lib in activtools instead of just symlinking?

Having separate PKGBUILDs for i686 and x86_64 isn't ideal. Why are the separate?

Last edited by Scimmia (2013-11-08 17:59:27)

Offline

#7 2013-11-08 20:11:49

Carl Karl
Member
Registered: 2013-06-12
Posts: 231

Re: [SOLVED] ActivInspire PKGBUILD Help

Oh, sorry, I forgot the disclaimer:
I'm a beginner and made the PKGBUILDs for myself (they are the first and only PKGBUILDs I did), because I need to use promethean hardware at work and don't want to screw arch for that.
Top priority was making the soft+hardware work (and they do work with these PKGBUILDs!), package elegance had significant less priority, there were enough other issues to solve first...

I shared the PKGBUILDs here, because
(a) maybe it's useful for someone (see this thread...)
(b) maybe - or, better said - most probably, someone is able to improve them. :-)

So any help is really welcome. :-)

So here is the list of biggest issues from my perspective as a user, anyone is really welcome to fix them:

  • the activcalibrate process doesn't close after the last calibration point and has to be killed (e.g. Ctrl+c or predefined keyboard combination) at the end of the calibration process. (Anyway, the calibration itself works)

  • When activtools is installed, activinspire needs to be killed before it can be re-started.

  • The equation editor can't be used, because activinspire doesn't find jre - although it is installed.

  • activinspire complains about not finding the flashplugin, although it is installed. OK, I don't think I need it, but it would be nice anyway.

So if you/someone has good knowledge and time to fix that: You are very welcome!

OK, and now to your questions:


Scimmia wrote:

I just took a quick look and there are some issues.
PKGBUILDS should never use /usr/local

I know, the problem is: These are closed source binaries. I expect they will break something when moved somewhere else.



Scimmia wrote:

Instead of moving to $pkgdir, extracting, then removing, why not just extract to $pkgdir:

bsdtar -xf data.tar.gz -C "$pkgdir"

Because I didn't knew how to do that and didn't see the need to do so, as it worked. But thanks for showing me a shorter alternative, I will use that in the future. :-)

Scimmia wrote:

The i686 versions are looking for a lib32 dir? What?

I just copied that, it didn't seem to cause trouble... Maybe because promethean wanted to have the same file for i686 and amd64?
But you're right, let's try what happens when it is removed.

Scimmia wrote:

Some uses of $pkgdir are quoted and some aren't.

What's the difference? Or, better asked: What is better?
(Both seem to work...)

Scimmia wrote:

Why cp a lib in activtools instead of just symlinking?

Because it doesn't matter? It's just a small file. But again, you're right, more elegant is a symlink, yes.

Scimmia wrote:

Having separate PKGBUILDs for i686 and x86_64 isn't ideal. Why are the separate?

Because I don't know how to make it else. That doesn't seem to be so easy to me: Different dependencies, for amd64, a libary has to be replaced, for i686, it needn't.

Last edited by Carl Karl (2013-11-08 20:15:37)

Offline

#8 2013-11-09 07:45:48

Carl Karl
Member
Registered: 2013-06-12
Posts: 231

Re: [SOLVED] ActivInspire PKGBUILD Help

[edit]All PKGBUILDs are in the AUR now:
activinspire

activtools
activdriver[/edit]

old post:



OK, here is an attempt to solve the things Scimmia said:

[edit]skip to most recent version[/edit]

PKGBUILD for activinspire:

# Maintainer: None Yet <youremail@domain.com>
pkgname=activinspire
pkgver=1.7.58968
pkgrel=1
pkgdesc="Software to use with Promethean Hardware products."
arch=('i686' 'x86_64')
license=('unknown')
if [ "$CARCH" = "i686" ]; then
  _arch='i386'
  _md5sum='ee5be21afd73cbcc8ab42fc18a3e9a4a'
  depends=('qt4' 'gstreamer0.10-good-plugins' 'libjpeg6')
elif [ "$CARCH" = "x86_64" ]; then
  _arch='amd64'
  _md5sum='5f4c9028d4813f0c394bb9b2258169ce'
  depends=('qt4' 'gstreamer0.10-good-plugins' 'lib32-libjpeg' 'lib32-libjpeg6' 'lib32-libxmu')
fi
source=(http://activsoftware.co.uk/linux/repos/ubuntu/pool/non-oss/a/activinspire/activinspire_$pkgver-4."$_arch"_"$_arch".deb)
md5sums=( $_md5sum ) 
package() {
        # extract the archive
        bsdtar -xf data.tar.gz -C "$pkgdir"

        # move out of the local directory to match arch standards
        cd "$pkgdir"/usr/local
        mv bin ..
        cd ..
        rmdir local

        # the included libphonon_gstreamer.so makes inspire crash on64bit, so take a link to a working one instead
        if [ "$CARCH" = "x86_64" ]; then
            cd "$pkgdir"/usr/bin/activsoftware/phonon_backend
            rm libphonon_gstreamer.so
            ln -s /usr/lib/libphonon.so libphonon_gstreamer.so
        fi


        # the starting script contains a lot of stuff specific to ubuntu, we don't need that and make a shorter one
        cd "$pkgdir"/usr/bin
        mv inspire inspire-for-ubuntu
        touch inspire
        chmod a+x inspire
        echo "#! /bin/bash" > inspire
        echo "cd /usr/bin/activsoftware" >> inspire
        if [ "$CARCH" = "i686" ]; then
            echo "export LD_LIBRARY_PATH=\"\$PWD:/usr/lib:\$LD_LIBRARY_PATH\"" >> inspire
        elif [ "$CARCH" = "x86_64" ]; then
            echo "export LD_LIBRARY_PATH=\"\$PWD:/usr/lib32:/usr/lib:\$LD_LIBRARY_PATH\"" >> inspire
        fi
        echo "./Inspire \$ARGS" >> inspire
        
        # delete the no-compiz-shortcut. if you want it, delete the following lines
        cd "$pkgdir"/usr/share/applications/
        rm activsoftware-nc.desktop 

        # modify the other one to match the new path and add a better hires icon
        mkdir "$pkgdir"/usr/share/icons/hicolor/512x512
        mkdir "$pkgdir"/usr/share/icons/hicolor/512x512/apps
        cp "$pkgdir"/usr/bin/activsoftware/inspire.ico "$pkgdir"/usr/share/icons/hicolor/512x512/apps
        echo "[Desktop Entry]" > activsoftware.desktop
        echo "Name=ActivInspire" >> activsoftware.desktop
        echo "Comment=Promethean ActivInspire" >> activsoftware.desktop
        echo "Exec=/usr/bin/inspire" >> activsoftware.desktop
        echo "Icon=/usr/share/icons/hicolor/512x512/apps/inspire.ico" >> activsoftware.desktop
        echo "Terminal=false" >> activsoftware.desktop
        echo "Encoding=UTF-8" >> activsoftware.desktop
        echo "Type=Application" >> activsoftware.desktop
        echo "Categories=Education;Promethean;Applications;" >> activsoftware.desktop
        echo "MimeType=application/x-asstudio;" >> activsoftware.desktop
        echo "StartupNotify=false" >> activsoftware.desktop
}

PKGBUILD for activitools:

# Maintainer: None Yet <youremail@domain.com>
pkgname=activtools
pkgver=5.8.46
pkgrel=1
pkgdesc="Includes activmanager, activcalibrate, activremote and activmonitor.
 You must install activtools if you want to use ActivInspire with Promethean
 hardware. You do not need activtools if you just want to run ActivInspire 
 Personal Edition."
arch=('i686' 'x86_64')
url="http://activsoftware.co.uk/linux/repos/ubuntu/dists/precise/Release"
license=('unknown')
depends=('qt4')
if [ "$CARCH" = "i686" ]; then
  _arch='i386'
  _md5sum='f6ae0e4f76b9d3f90cf1557cbc9ff3df'
elif [ "$CARCH" = "x86_64" ]; then
  _arch='amd64'
  _md5sum='731540a2034a925c6e01adc7c1c36eb3'
fi
source=(http://activsoftware.co.uk/linux/repos/ubuntu/pool/non-oss/a/activtools/activtools_$pkgver-13~ubuntu~1204_$_arch.deb)
md5sums=( $_md5sum )

package() {
        # extract the archive
        bsdtar -xf data.tar.gz -C "$pkgdir"

        # move out of the local directory to match arch standards
        cd "$pkgdir"/usr/local
        mv bin ..
        mv lib ..
        if [ "$CARCH" = "x86_64" ]; then
            mv lib32 ..
        fi
        cd ..
        rmdir local

        #activmgr works only when started after board is attached, so no autostart. Delete the follwing line if you want an autostart of activmgr
        cd "$pkgdir"
	rm -r etc

        #activcalibration needs libactivboardex.so.1 instead of libactivboardex.so.1.0 
	cd "$pkgdir"/usr/lib
	ln -s libactivboardex.so.1.0 libactivboardex.so.1 
}

PKGBUILD for activdriver:

# Maintainer: Christian Bühler <...>
# Contributor: Zsolt Udvari <...>
# Contributor: Carl Karl <...> (pkgrel=2)
pkgname=activdriver
pkgver=5.8.46
pkgrel=2
pkgdesc="The kernel mode and X11 drivers for Promethean ActivBoard and ActivHub."
arch=('i686' 'x86_64')
url="http://activsoftware.co.uk/linux/repos/ubuntu/dists/precise/Release"
license=('unknown')
makedepends=(linux-headers)
install=$pkgname.install
if [ "$CARCH" = "i686" ]; then
  _arch='i386'
  _md5sum='e2336497217283d9493f0231f0f8e9e2'
elif [ "$CARCH" = "x86_64" ]; then
  _arch='amd64'
  _md5sum='1d373dd00e23e082e4c4be689fec8123'
fi
source=(http://activsoftware.co.uk/linux/repos/ubuntu/pool/oss/a/$pkgname/${pkgname}_$pkgver-13~ubuntu~1204_$_arch.deb
        10-promethean.conf)
md5sums=( $_md5sum
         '11effc25fd592acacb9f9f3108618963')

build() {
  tar xf data.tar.gz
  make -C /lib/modules/$(uname -r)/build SUBDIRS="$srcdir/usr/src/promethean/kernel" modules
  sed -i "s%KERN_INC = /usr/src/promethean%KERN_INC = ..%" usr/src/promethean/activlc/Makefile
  BUILD=release make -C usr/src/promethean/activlc
  sed -i s%/usr/local/bin/%%g usr/bin/promethean.sh
}

package() {
  mkdir -p "$pkgdir/usr" 
  cp -r etc lib "$pkgdir"
  cp -r usr/bin usr/lib usr/share "$pkgdir"/usr
  install -D usr/src/promethean/activlc/release/activlc "$pkgdir"/usr/bin/activlc
  _extmoddir=$(uname -r | sed "s@\([0-9]*\.[0-9]*\)\.[0-9]*-[0-9]*\(.*\)@\1\2@")
  
  # changed compared to pkgrel=1: needs to be this path now:
  _moddir="/lib/modules/extramodules-${_extmoddir}"/kernel/drivers/input/tablet/

  install -m644 -D usr/src/promethean/kernel/promethean.ko \
    "$pkgdir${_moddir}"/promethean.ko
  find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
  install -D 10-promethean.conf "$pkgdir"/etc/X11/xorg.conf.d/10-promethean.conf

  # changed compared to pkgrel=1: load module on boot. If you don't want this, delete the following lines and load it manually with sudo modprobe promethean
  mkdir -p "$pkgdir"/etc/modules-load.d
  cd "$pkgdir"/etc/modules-load.d
  touch promethean.conf
  echo "promethean" > promethean.conf
}

together with 10-promethean.conf:

Section "InputDevice"
	Identifier "activpen"
	Driver "promethean"
	Option "Device" "/dev/input/activdevices"
	Option "Type" "stylus"
	Option "Mode" "Absolute"
	Option "Cursor" "stylus"
	Option "USB" "on"
	Option "debuglevel" "5"
	Option "Vendor" "promethean"
	Option "SendCoreEvents" "true"
EndSection

and activdriver.install:

post_install() {
  depmod
}

better now? :-)

Last edited by Carl Karl (2014-01-24 02:30:51)

Offline

#9 2013-11-09 18:22:50

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: [SOLVED] ActivInspire PKGBUILD Help

definitely looking better. smile Just a couple of suggestions, but only the first one is really important, the rest aren't critical.

1. It looks like you have something in /lib in activdriver? This is wrong in Arch, /lib is just a symlink to /usr/lib. It will work for now, but in Pacman 4.2, support for traversing those links this way will be removed.

And the unimportant ones:

2. When moving everything from /usr/local to /usr, you can just use a glob.

mv * ..

This lets you avoid the "if [ "$CARCH" = "x86_64" ]", too. In fact, I would avoid all of the cding, too

mv "$pkgdir/usr/local/"* "$pkgdir/usr/"
rmdir "$pkgdir/usr/local/"

If you cd to $pkgdir first, you can eliminate that from the paths, and then you're in the right dir to keep going.

3. On the icon, you can use install to avoid mkdir, and cp.

install -Dm644 "$pkgdir/usr/bin/activsoftware/inspire.ico" "$pkgdir/usr/share/icons/hicolor/512x512/apps/inspire.ico"

That will do it all, and set the permissions on the file to 644.

4. You're creating a whole new .desktop file, why? You're usually better off just using sed to modify the upstream one.
If you need to use a totally different one, that's fine, but it's usually better to just make the file and include it in the source array rather than echo everything the PKGBUILD.

5. Have you tried running without the script that sets LD_LIBRARY_PATH? Installing to /usr/lib and /usr/lib32, it shouldn't be needed.

6. If you set the normal deps (qt4 and gstreamer0.10-good-plugins), you can just do "depends+=()" in the if to set the things that are different for each architecture.

Again, these aren't critical, just general suggestions. I'm glad to see that you have all uses of $pkgdir quoted, sorry I didn't respond earlier. That's important because that path could contain a space, which will break things if it's not quoted.

Last edited by Scimmia (2013-11-09 18:23:27)

Offline

#10 2013-11-09 18:36:38

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: [SOLVED] ActivInspire PKGBUILD Help

Carl Karl wrote:

So here is the list of biggest issues from my perspective as a user, anyone is really welcome to fix them:

  • the activcalibrate process doesn't close after the last calibration point and has to be killed (e.g. Ctrl+c or predefined keyboard combination) at the end of the calibration process. (Anyway, the calibration itself works)

  • When activtools is installed, activinspire needs to be killed before it can be re-started.

  • The equation editor can't be used, because activinspire doesn't find jre - although it is installed.

  • activinspire complains about not finding the flashplugin, although it is installed. OK, I don't think I need it, but it would be nice anyway.

So let's take a look at this list.

1. Is this a cli program? Anything at all in stderr or stdout?
2. This only happens when you actually install activtools? If so, you can use pre/post install scripts to kill and/or restart activinspire. Or does this happen every time after activtools is installed?
3. What is the exact error message?
4. See 3

Offline

#11 2013-11-09 21:13:35

Carl Karl
Member
Registered: 2013-06-12
Posts: 231

Re: [SOLVED] ActivInspire PKGBUILD Help

Really thanks for your help, Scimmia. Now I remember I started with the " quotes exactly because of that reason (spaces in folder names).
In fact, it is still a problem in the activdriver PKGBUILD, that breaks in the build() function when used in a folder with space in path. But I suppose, it's more because of the build function. Haven't explored it totally yet.

But moving the build from /lib to /usr/lib should be no problem, and I will also look at the other tips you gave me when I've got time.
Thanks again! :-)

Offline

#12 2013-11-11 16:27:14

Carl Karl
Member
Registered: 2013-06-12
Posts: 231

Re: [SOLVED] ActivInspire PKGBUILD Help

[edit]All PKGBUILDs are in the AUR now:
activinspire

activtools
activdriver[/edit]

old post:


OK, I tried to include Scimmias new tips again. (Thanks again, I learned interesting things! :-) ) And today, I had the opportunity to test it with the hardware again. And it works! :-) So moving directories didn't break anything as I feared.

As things look quite good now, I consider posting them to AUR.
And as there are some more or less small issues left, I wonder what's the best way to communicate these issues. What about echo messages + comments in the PKGBUILD?

Would look so:

[edit]skip to most recent version[/edit]

activdriver: (that would be an update, but the momentary maintainer offered me to take it [I'm registered as "Bazon" at AUR.])

# Maintainer: Bazon <...> 
# Contributor: Christian Bühler <...>
# Contributor: Zsolt Udvari <...>
pkgname=activdriver
pkgver=5.8.46
pkgrel=2
pkgdesc="The kernel mode and X11 drivers for Promethean ActivBoard and ActivHub."
arch=('i686' 'x86_64')
url="http://activsoftware.co.uk/linux/repos/ubuntu/dists/precise/Release"
license=('unknown')
makedepends=(linux-headers)
optdepends=('activinspire: activboard presentation'
            'activtools: hardware calibration')
install=$pkgname.install
if [ "$CARCH" = "i686" ]; then
  _arch='i386'
  _md5sum='e2336497217283d9493f0231f0f8e9e2'
elif [ "$CARCH" = "x86_64" ]; then
  _arch='amd64'
  _md5sum='1d373dd00e23e082e4c4be689fec8123'
fi
source=(http://activsoftware.co.uk/linux/repos/ubuntu/pool/oss/a/$pkgname/${pkgname}_$pkgver-13~ubuntu~1204_$_arch.deb
        10-promethean.conf)
md5sums=( $_md5sum
         '11effc25fd592acacb9f9f3108618963')

build() {
  tar xf data.tar.gz
  echo " "
  echo "Attention!"
  echo "Build will fail if run in a directory with space(s) in its path."
  #(reason: makefile of the source. if you know how to fix: please tell!)
  echo " "
  make -C /lib/modules/$(uname -r)/build SUBDIRS="$srcdir"/usr/src/promethean/kernel modules
  sed -i "s%KERN_INC = /usr/src/promethean%KERN_INC = ..%" usr/src/promethean/activlc/Makefile
  BUILD=release make -C usr/src/promethean/activlc
  sed -i s%/usr/local/bin/%%g usr/bin/promethean.sh
}

package() {
  mkdir -p "$pkgdir"/usr 
  cp -r etc lib "$pkgdir"
  cp -r usr/bin usr/lib usr/share "$pkgdir"/usr
  install -D usr/src/promethean/activlc/release/activlc "$pkgdir"/usr/bin/activlc
  _extmoddir=$(uname -r | sed "s@\([0-9]*\.[0-9]*\)\.[0-9]*-[0-9]*\(.*\)@\1\2@")
  
  # changed compared to pkgrel=1: needs to be this path now:
  _moddir="/usr/lib/modules/extramodules-${_extmoddir}"/kernel/drivers/input/tablet/

  install -m644 -D usr/src/promethean/kernel/promethean.ko \
    "$pkgdir${_moddir}"/promethean.ko
  find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
  install -D 10-promethean.conf "$pkgdir"/etc/X11/xorg.conf.d/10-promethean.conf

  # changed compared to pkgrel=1: move /lib to /usr/lib to match arch standards
  mv "${pkgdir}"/lib/* "${pkgdir}"/usr/lib/ 
  rmdir "${pkgdir}"/lib

  # changed compared to pkgrel=1: load module on boot. 
  # If you don't want this, delete the following lines and load it manually with sudo modprobe promethean
  mkdir -p "$pkgdir"/etc/modules-load.d
  cd "$pkgdir"/etc/modules-load.d
  touch promethean.conf
  echo "promethean" > promethean.conf
  echo " "
  echo "If you don't want the promethean module to be loaded on boot, delete /etc/modules-load.d/promethean.conf or delete the matching lines in PKGBUILD."
  echo " "
}

activinspire:

# Maintainer: Bazon <...>
pkgname=activinspire
pkgver=1.7.58968
pkgrel=1
pkgdesc="Presentation Software to use with Promethean Hardware products."
arch=('i686' 'x86_64')
url="http://activsoftware.co.uk/linux/repos/ubuntu/dists/precise/Release"
license=('unknown')
if [ "$CARCH" = "i686" ]; then
  _arch='i386'
  _md5sum='ee5be21afd73cbcc8ab42fc18a3e9a4a'
  depends=('qt4' 'gstreamer0.10-good-plugins' 'libjpeg6')
elif [ "$CARCH" = "x86_64" ]; then
  _arch='amd64'
  _md5sum='5f4c9028d4813f0c394bb9b2258169ce'
  depends=('qt4' 'gstreamer0.10-good-plugins' 'lib32-libjpeg' 'lib32-libjpeg6' 'lib32-libxmu')
fi
optdepends=('activdriver: promethean hardware support'
            'activtools: hardware calibration')
source=(http://activsoftware.co.uk/linux/repos/ubuntu/pool/non-oss/a/activinspire/activinspire_$pkgver-4."$_arch"_"$_arch".deb)
md5sums=( $_md5sum ) 
package() {
        # extract the archive
        bsdtar -xf data.tar.gz -C "$pkgdir"

        # move out of the local directory to match arch standards
        cd "$pkgdir"/usr/local
        mv bin ..
        cd ..
        rmdir local

        # the included libphonon_gstreamer.so makes inspire crash on64bit, so take a link to a working one instead
        if [ "$CARCH" = "x86_64" ]; then
            cd "$pkgdir"/usr/bin/activsoftware/phonon_backend
            rm libphonon_gstreamer.so
            ln -s /usr/lib/libphonon.so libphonon_gstreamer.so
        fi


        # the starting script contains a lot of stuff specific to ubuntu, we don't need that and make a shorter one
        cd "$pkgdir"/usr/bin
        mv inspire inspire-for-ubuntu
        touch inspire
        chmod a+x inspire
        echo "#! /bin/bash" > inspire
        echo "cd /usr/bin/activsoftware" >> inspire
        echo "./Inspire \$ARGS" >> inspire
        
        cd "$pkgdir"/usr/share/applications/
        # delete the no-compiz-shortcut. if you want it, delete the following line
        rm activsoftware-nc.desktop 

        # modify the other one to match the new path and add a better hires icon
        install -Dm644 "$pkgdir/usr/bin/activsoftware/inspire.ico" "$pkgdir/usr/share/icons/hicolor/512x512/apps/inspire.ico"
        sed -i 's/48x48\/apps\/asstudio.png/512x512\/apps\/inspire.ico/' activsoftware.desktop
        sed -i 's/usr\/local\/bin/usr\/bin/' activsoftware.desktop
}

activtools:

# Maintainer: Bazon <...>
pkgname=activtools
pkgver=5.8.46
pkgrel=1
pkgdesc="Tools to calibrate (activcalibrate) and manage (activmgr) Promethean hardware devices."
arch=('i686' 'x86_64')
url="http://activsoftware.co.uk/linux/repos/ubuntu/dists/precise/Release"
license=('unknown')
depends=('qt4')
if [ "$CARCH" = "i686" ]; then
  _arch='i386'
  _md5sum='f6ae0e4f76b9d3f90cf1557cbc9ff3df'
elif [ "$CARCH" = "x86_64" ]; then
  _arch='amd64'
  _md5sum='731540a2034a925c6e01adc7c1c36eb3'
fi
optdepends=('activinspire: activboard presentation'
            'activdriver: promethean hardware support')
source=(http://activsoftware.co.uk/linux/repos/ubuntu/pool/non-oss/a/activtools/activtools_$pkgver-13~ubuntu~1204_$_arch.deb)
md5sums=( $_md5sum )

package() {
        # extract the archive
        bsdtar -xf data.tar.gz -C "$pkgdir"

        # move out of the local directory to match arch standards
        mv "$pkgdir"/usr/local/* "$pkgdir"/usr/
        rmdir "$pkgdir"/usr/local

        #activmgr works only when started after board is attached, so no autostart. 
        #Delete the follwing line if you want an autostart of activmgr
        cd "$pkgdir"
	rm -r etc

        #activcalibrate needs libactivboardex.so.1 instead of libactivboardex.so.1.0 
        #(and needs to be killed after last calibration point with Alt+F4)
        #(if you know how to fix: please tell!)
	cd "$pkgdir"/usr/lib
	ln -s libactivboardex.so.1.0 libactivboardex.so.1 
        if [ "$CARCH" = "x86_64" ]; then
            cd "$pkgdir"/usr/lib32    libactivboardex.so.1.0
            ln -s libactivboardex.so.1.0 libactivboardex.so.1 
        fi

        echo " "
        echo "when activtools is installed, activinspire needs to be killed before it can restart"
        #(if you know how to fix: please tell!)
        echo "therefore, a second launcher to restart activinspire is created (inspire-restart)"
        cd "$pkgdir"/usr/bin
        touch inspire-restart
        chmod a+x inspire-restart
        echo "#! /bin/bash" > inspire-restart
        echo "killall inspire Inspire ; inspire" >> inspire-restart

        cd "$pkgdir"/usr/share/applications/
        echo "[Desktop Entry]" > activinspire-restart.desktop
        echo "Name=ActivInspire (restart)" >> activinspire-restart.desktop
        echo "Comment=Promethean ActivInspire - restart needed when using activtools" >> activinspire-restart.desktop
        echo "Exec=/usr/bin/inspire-restart" >> activinspire-restart.desktop
        echo "Icon=/usr/share/icons/hicolor/512x512/apps/inspire.ico" >> activinspire-restart.desktop
        echo "Terminal=false" >> activinspire-restart.desktop
        echo "Encoding=UTF-8" >> activinspire-restart.desktop
        echo "Type=Application" >> activinspire-restart.desktop
        echo "Categories=Education;Promethean;Applications;" >> activinspire-restart.desktop
        echo "MimeType=application/x-asstudio;" >> activinspire-restart.desktop
        echo "StartupNotify=false" >> activinspire-restart.desktop

        echo " "
        echo "If you want to toggle calibration via hovering the activboard hotspot, run activmgr."
        echo "activcalibrate has to be closed by Alt+F4 or get killed after the last calibration-point."
        echo " "
}
Scimmia wrote:

1. Is this a cli program? Anything at all in stderr or stdout?

To be honest, I haven't understood the stderr thing, but you can start each of them from the CLI:

$ activcalibrate
(...)
Promethean: Detaching devices
Promethean: Detached devices
Promethean: Detaching pnp

While running this, the screen gets white only with calibration-points you have to touch one after another. That works, but only: The screen stay white!

The same with:

$ activinspire
(...)
Promethean: Detaching devices
Promethean: Detached devices
Promethean: Detaching pnp

So it seems to hang on detaching pnp. No idea how to fix this...

Scimmia wrote:

2. This only happens when you actually install activtools? If so, you can use pre/post install scripts to kill and/or restart activinspire. Or does this happen every time after activtools is installed?

It happens when activtools is installed. (I noticed more precisly: It doesn't happen without /usr/lib/libactivboard.so.1 , but without that file, calibration doesn't work at all.) As you may have seen, I proposed an approach with an additional restart launcher. (I use it myself that way, I only didn't include it before.)

Scimmia, abot jre wrote:

3. What is the exact error message?

The message is:

Failed to load the Java runtime environment, please install the latest Java Runtime Environment to its default location. The Java Runtime Environment can be downloaded from : http://www.java.com

It neither recognizes OpenJDK nor jre (AUR). I wonder which "default location" is meant...?

Scimmia, abot flash wrote:

4. See 3

Translated from german:

For some ActivInspire-Functions Adobe Flash Player has to be installed. You can download it from ....

Last edited by Carl Karl (2014-01-24 02:31:20)

Offline

#13 2013-11-11 17:46:01

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: [SOLVED] ActivInspire PKGBUILD Help

You're still overusing echo and cd to the extreme.

Is the startup script needed at all if all? It seems to me a symlink would so the same thing, but sometimes software looks for other commands relative to the current dir, so the script may be needed.

Echoing a message for the end user at build time is useless, that needs to be done at install time.

You also keep using touch, why?

On to the repsonses to my question:
1. Not much we can do, then, outside of contacting the company.
2. Didn't really answer the question. Is the problem just at the time when activtools is actually installed or does it always happen at every run after it's installed?
3 & 4. Pretty useless error messages, more typical for Windows than Linux. I would check and make sure $JAVA_HOME is set correctly (hopefully they at least use that). No idea on flash.

Last edited by Scimmia (2013-11-11 18:06:35)

Offline

#14 2013-11-11 19:19:06

Carl Karl
Member
Registered: 2013-06-12
Posts: 231

Re: [SOLVED] ActivInspire PKGBUILD Help

Scimmia wrote:

You're still overusing echo and cd to the extreme.

Still? I inserted most of the echoes only this time! ;-)
(OK, forget about deCD-ing. But on the other hand: Is it harmful? It makes at least entered paths shorter...)

Scimmia wrote:

Is the startup script needed at all if all? It seems to me a symlink would so the same thing, but sometimes software looks for other commands relative to the current dir, so the script may be needed.

Yes, exactly that is the case. Without the script, the program is complaining about missing libaries which are in the directory which is CDed to in the script.

Scimmia wrote:

Echoing a message for the end user at build time is useless, that needs to be done at install time.

In this case, I disagree. The message is about failing build when run in directory with space(s) in path. So this message is only important in the case of a build failing because of spaces in path. So the echo will be displayed right above the fail message so the user gets a notice, why it failed. (I tested that.)

Scimmia wrote:

You also keep using touch, why?

In fact, I haven't it inside at the beginning, but without it, I had chmod a+x inspire after writing the script, but the file wasn't set as executable.
Whyever.

Scimmia wrote:

2. Didn't really answer the question. Is the problem just at the time when activtools is actually installed or does it always happen at every run after it's installed?.

For the rest I will look later. :-)

Offline

#15 2013-11-11 19:30:34

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: [SOLVED] ActivInspire PKGBUILD Help

Carl Karl wrote:
Scimmia wrote:

You're still overusing echo and cd to the extreme.

Still? I inserted most of the echoes only this time! ;-)
(OK, forget about deCD-ing. But on the other hand: Is it harmful? It makes at least entered paths shorter...)

No, you had a ton of them before, such as echoing en entire .desktop file. You just added even more.

cd'ing isn't harmful, just wasted when it's only to do a single rm or something.

Carl Karl wrote:
Scimmia wrote:

Echoing a message for the end user at build time is useless, that needs to be done at install time.

In this case, I disagree. The message is about failing build when run in directory with space(s) in path. So this message is only important in the case of a build failing because of spaces in path. So the echo will be displayed right above the fail message so the user gets a notice, why it failed. (I tested that.)

I'm talking about things like these:

  echo " "
  echo "If you don't want the promethean module to be loaded on boot, delete /etc/modules-load.d/promethean.conf or delete the matching lines in PKGBUILD."
  echo " "
        echo " "
        echo "If you want to toggle calibration via hovering the activboard hotspot, run activmgr."
        echo "activcalibrate has to be closed by Alt+F4 or get killed after the last calibration-point."
        echo " "

These are notes to the end user, not the the person building the package. They may not be the same person.

Carl Karl wrote:
Scimmia wrote:

You also keep using touch, why?

In fact, I haven't it inside at the beginning, but without it, I had chmod a+x inspire after writing the script, but the file wasn't set as executable.
Whyever.

So chmod after you create the script. That would be the normal way of doing things. I would suggest setting 755, too, not just +x.

Offline

#16 2013-11-12 05:49:24

Carl Karl
Member
Registered: 2013-06-12
Posts: 231

Re: [SOLVED] ActivInspire PKGBUILD Help

[edit]All PKGBUILDs are in the AUR now:
activinspire

activtools
activdriver[/edit]

old post:



OK, now I understand. Really thanks for your patience.

Now I have:

activdriver PKGBUILD:

# Maintainer: Bazon <...> 
# Contributor: Christian Bühler <...>
# Contributor: Zsolt Udvari <...>
pkgname=activdriver
pkgver=5.8.46
pkgrel=2
pkgdesc="The kernel mode and X11 drivers for Promethean ActivBoard and ActivHub."
arch=('i686' 'x86_64')
url="http://activsoftware.co.uk/linux/repos/ubuntu/dists/precise/Release"
license=('unknown')
makedepends=(linux-headers)
optdepends=('activinspire: activboard presentation'
            'activtools: hardware calibration')
install=$pkgname.install
if [ "$CARCH" = "i686" ]; then
  _arch='i386'
  _md5sum='e2336497217283d9493f0231f0f8e9e2'
elif [ "$CARCH" = "x86_64" ]; then
  _arch='amd64'
  _md5sum='1d373dd00e23e082e4c4be689fec8123'
fi
source=(http://activsoftware.co.uk/linux/repos/ubuntu/pool/oss/a/$pkgname/${pkgname}_$pkgver-13~ubuntu~1204_$_arch.deb
        10-promethean.conf)
md5sums=( $_md5sum
         '11effc25fd592acacb9f9f3108618963')

build() {
  tar xf data.tar.gz
  echo " "
  echo "Attention!"
  echo "Build will fail if run in a directory with space(s) in its path."
  #(reason: makefile of the source. if you know how to fix: please tell!)
  echo " "
  make -C /lib/modules/$(uname -r)/build SUBDIRS="$srcdir"/usr/src/promethean/kernel modules
  sed -i "s%KERN_INC = /usr/src/promethean%KERN_INC = ..%" usr/src/promethean/activlc/Makefile
  BUILD=release make -C usr/src/promethean/activlc
  sed -i s%/usr/local/bin/%%g usr/bin/promethean.sh
}

package() {
  mkdir -p "$pkgdir"/usr 
  cp -r etc lib "$pkgdir"
  cp -r usr/bin usr/lib usr/share "$pkgdir"/usr
  install -D usr/src/promethean/activlc/release/activlc "$pkgdir"/usr/bin/activlc
  _extmoddir=$(uname -r | sed "s@\([0-9]*\.[0-9]*\)\.[0-9]*-[0-9]*\(.*\)@\1\2@")
  
  # changed compared to pkgrel=1: needs to be this path now:
  _moddir="/usr/lib/modules/extramodules-${_extmoddir}"/kernel/drivers/input/tablet/

  install -m644 -D usr/src/promethean/kernel/promethean.ko \
    "$pkgdir${_moddir}"/promethean.ko
  find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
  install -D 10-promethean.conf "$pkgdir"/etc/X11/xorg.conf.d/10-promethean.conf

  # changed compared to pkgrel=1: move /lib to /usr/lib to match arch standards
  mv "${pkgdir}"/lib/* "${pkgdir}"/usr/lib/ 
  rmdir "${pkgdir}"/lib

  # changed compared to pkgrel=1: load module on boot. 
  # If you don't want this, delete the following lines and load it manually with sudo modprobe promethean
  mkdir -p "$pkgdir"/etc/modules-load.d
  echo "promethean" > "$pkgdir"/etc/modules-load.d/promethean.conf
}

together with activdriver.install:

post_install() {
  depmod
  echo " "
  echo "If you don't want the promethean module to be loaded on boot, delete /etc/modules-load.d/promethean.conf or delete the matching lines in PKGBUILD and re-install."
  echo " "
}

activinspire PKGBUILD:

# Maintainer: Bazon <...>
pkgname=activinspire
pkgver=1.7.58968
pkgrel=1
pkgdesc="Presentation Software to use with Promethean Hardware products."
arch=('i686' 'x86_64')
url="http://activsoftware.co.uk/linux/repos/ubuntu/dists/precise/Release"
license=('unknown')
if [ "$CARCH" = "i686" ]; then
  _arch='i386'
  _md5sum='ee5be21afd73cbcc8ab42fc18a3e9a4a'
  depends=('qt4' 'gstreamer0.10-good-plugins' 'libjpeg6')
elif [ "$CARCH" = "x86_64" ]; then
  _arch='amd64'
  _md5sum='5f4c9028d4813f0c394bb9b2258169ce'
  depends=('qt4' 'gstreamer0.10-good-plugins' 'lib32-libjpeg' 'lib32-libjpeg6' 'lib32-libxmu')
fi
optdepends=('activdriver: promethean hardware support'
            'activtools: hardware calibration')
source=(http://activsoftware.co.uk/linux/repos/ubuntu/pool/non-oss/a/activinspire/activinspire_$pkgver-4."$_arch"_"$_arch".deb)
md5sums=( $_md5sum ) 
package() {
        # extract the archive
        bsdtar -xf data.tar.gz -C "$pkgdir"

        # move out of the local directory to match arch standards
        mv "$pkgdir"/usr/local/bin "$pkgdir"/usr/
        rmdir "$pkgdir"/usr/local

        # the included libphonon_gstreamer.so makes inspire crash on64bit, so take a link to a working one instead
        if [ "$CARCH" = "x86_64" ]; then
            rm "$pkgdir"/usr/bin/activsoftware/phonon_backend/libphonon_gstreamer.so
            ln -s /usr/lib/libphonon.so "$pkgdir"/usr/bin/activsoftware/phonon_backend/libphonon_gstreamer.so
        fi

        # the starting script contains a lot of stuff specific to ubuntu, we don't need that and make a shorter one
        mv "$pkgdir"/usr/bin/inspire "$pkgdir"/usr/bin/inspire-for-ubuntu
        echo "#! /bin/bash" > "$pkgdir"/usr/bin/inspire
        echo "cd /usr/bin/activsoftware" >> "$pkgdir"/usr/bin/inspire
        echo "./Inspire \$ARGS" >> "$pkgdir"/usr/bin/inspire
        chmod 755 "$pkgdir"/usr/bin/inspire
        
        # delete the no-compiz-shortcut. if you want it, delete the following line
        rm "$pkgdir"/usr/share/applications/activsoftware-nc.desktop 

        # modify the other one to match the new path and add a better hires icon
        install -Dm644 "$pkgdir/usr/bin/activsoftware/inspire.ico" "$pkgdir/usr/share/icons/hicolor/512x512/apps/inspire.ico"
        sed -i 's/48x48\/apps\/asstudio.png/512x512\/apps\/inspire.ico/' "$pkgdir"/usr/share/applications/activsoftware.desktop
        sed -i 's/usr\/local\/bin/usr\/bin/' "$pkgdir"/usr/share/applications/activsoftware.desktop
}

activtools PKGBUILD:

# Maintainer: Bazon <...>
pkgname=activtools
pkgver=5.8.46
pkgrel=1
pkgdesc="Tools to calibrate (activcalibrate) and manage (activmgr) Promethean hardware devices."
arch=('i686' 'x86_64')
url="http://activsoftware.co.uk/linux/repos/ubuntu/dists/precise/Release"
license=('unknown')
depends=('qt4')
if [ "$CARCH" = "i686" ]; then
  _arch='i386'
  _md5sum='f6ae0e4f76b9d3f90cf1557cbc9ff3df'
elif [ "$CARCH" = "x86_64" ]; then
  _arch='amd64'
  _md5sum='731540a2034a925c6e01adc7c1c36eb3'
fi
optdepends=('activinspire: activboard presentation'
            'activdriver: promethean hardware support')
install=$pkgname.install
source=(http://activsoftware.co.uk/linux/repos/ubuntu/pool/non-oss/a/activtools/activtools_$pkgver-13~ubuntu~1204_$_arch.deb)
md5sums=( $_md5sum )

package() {
        # extract the archive
        bsdtar -xf data.tar.gz -C "$pkgdir"

        # move out of the local directory to match arch standards
        mv "$pkgdir"/usr/local/* "$pkgdir"/usr/
        rmdir "$pkgdir"/usr/local

        #activmgr works only when started after board is attached, so no autostart. 
        #Delete the follwing line if you want an autostart of activmgr
	rm -r "$pkgdir"/etc

        #activcalibrate needs libactivboardex.so.1 instead of libactivboardex.so.1.0 
        #(and needs to be killed after last calibration point with Alt+F4)
        #(if you know how to fix: please tell!)
	ln -s "$pkgdir"/usr/lib/libactivboardex.so.1.0 "$pkgdir"/usr/lib/libactivboardex.so.1 
        if [ "$CARCH" = "x86_64" ]; then   
            ln -s "$pkgdir"/usr/lib32/libactivboardex.so.1.0 "$pkgdir"/usr/lib32/libactivboardex.so.1 
        fi

        # when activtools is installed, activinspire needs to be killed before it can restart
        #(if you know how to fix: please tell!)
        # therefore, a second launcher to restart activinspire is created (inspire-restart)
        echo "#! /bin/bash" > "$pkgdir"/usr/bin/inspire-restart
        echo "killall inspire Inspire ; inspire" >> "$pkgdir"/usr/bin/inspire-restart
        chmod 755 "$pkgdir"/usr/bin/inspire-restart
        install -Dm644 ../activinspire-restart.desktop "$pkgdir"/usr/share/applications/activinspire-restart.desktop
}

together with the desktop file and activtools.install:

post_install() {
     echo " "
     echo "When activtools is installed, activinspire needs to be killed before it can restart."
     echo "Therefore, a second launcher to restart activinspire is created (inspire-restart)."
     echo " "
     echo "If you want to toggle calibration via hovering the activboard hotspot, run activmgr."
     echo "If you just want to calibrate, run activcalibrate."
     echo "In both cases, activcalibrate has to be closed by Alt+F4 or get killed after the last calibration-point."
}

So not a single cd anymore (except the one written to the created script) if I counted right and significant less echoes in the PKGBUILDs. (nod)

Last edited by Carl Karl (2014-01-24 02:31:52)

Offline

#17 2013-11-12 18:09:42

MrMen
Member
Registered: 2013-09-22
Posts: 4

Re: [SOLVED] ActivInspire PKGBUILD Help

On 64 bits, there's another depend : lib32-gstreamer-base.
I will try all this during the week and give you feedback.

I remember that I fixed the activcalibrate bug (i.e. force close not needed) but I can't remember how I did this…

Offline

#18 2013-11-12 20:13:03

Carl Karl
Member
Registered: 2013-06-12
Posts: 231

Re: [SOLVED] ActivInspire PKGBUILD Help

Great! I'm looking forward to it, thank you!

Offline

#19 2013-11-18 19:41:29

Carl Karl
Member
Registered: 2013-06-12
Posts: 231

Re: [SOLVED] ActivInspire PKGBUILD Help

One more thing about the activdriver from AUR:

When run with makepkg from local drive, it works (pkg-size=0.36MB), but when run from yaourt, it doesn't work (pkg-size=0.25MB, modules and udev missing in libs).

Has anyone an idea what can cause such yaourt problems?

Offline

#20 2013-11-18 20:06:51

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: [SOLVED] ActivInspire PKGBUILD Help

I'm getting exactly the same thing both ways, a 258KB (installed) package.

Offline

#21 2014-01-24 00:47:51

jbreizh
Member
Registered: 2012-10-20
Posts: 44

Re: [SOLVED] ActivInspire PKGBUILD Help

Hello,
I second MrMen reply. I try it depend on lib32-gstreamer-base.
Can you update your PKGBUILD please?
Have a nice day

Offline

#22 2014-01-24 02:27:44

Carl Karl
Member
Registered: 2013-06-12
Posts: 231

Re: [SOLVED] ActivInspire PKGBUILD Help

Hello jbreizh!

1. I tried adding lib32-gstreamer-base to the depends, but led into problems because it wasn't found, so I left it out. Do you mean lib32-gstreamer0.10-base?

2. Sorry, I forgot to mention here that all PKGBUILDs are in the AUR now:
activinspire
activtools
activdriver

I'll edit the old posts in a minute...

Offline

#23 2014-01-26 07:12:02

jbreizh
Member
Registered: 2012-10-20
Posts: 44

Re: [SOLVED] ActivInspire PKGBUILD Help

That's it !!! without the  lib32-gstreamer0.10-base, actinspire fail to start because it can't find libgstapp-0.10.so.0.
I find an other problem : when you clic on a .flipchart file, it launch activinspire, but it don't open the .flipchart. Can you check this problem, it's maybe my install.
Anyway you have done a great job in packaging activinspire. I use this software everyday with my student.

Offline

#24 2014-01-29 18:10:23

Carl Karl
Member
Registered: 2013-06-12
Posts: 231

Re: [SOLVED] ActivInspire PKGBUILD Help

@jbreizh:
OK, I've got the same problem.
I succeeded in opening a file from terminal by editing /usr/bin/inspire to

#! /bin/bash
while [ -n "$1" ]; do
		ARGS="$ARGS $1"
	shift
done
cd /usr/bin/activsoftware
./Inspire $ARGS

(the "while" part is new.)

But if I try to open a .flipchart file with thunar, it doesn't work. Whyever.

I also tried editing /usr/share/applications/activsoftware.desktop
to

[Desktop Entry]
Name=ActivInspire
Comment=Promethean ActivInspire
Exec=/usr/bin/inspire %U
Icon=/usr/share/icons/hicolor/512x512/apps/inspire.ico
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Education;Promethean;Applications;
MimeType=application/x-asstudio;
StartupNotify=false

(added the %U, like in the gedit desktop file for example),

but that also didn't work.

Any ideas?

Offline

#25 2014-01-30 06:09:25

jbreizh
Member
Registered: 2012-10-20
Posts: 44

Re: [SOLVED] ActivInspire PKGBUILD Help

hello,
here some document from the version 1.6 tar.gz I use before your PKGBUILD:

install.sh:

#! /bin/bash
#update-mime-database /usr/share/mime
NAME=`basename $0`

if [ "$NAME" == "install.sh" ]; then
	if [ "`id -u`" != "0" ]; then
		echo Run this command with su or sudo.
		exit -1
	fi
	ROOTDIR=`dirname $0`
	chown -R root.root "$ROOTDIR"

	chmod -R 777 "$ROOTDIR"/etc/xdg/Promethean
	echo Copying settings...
	cp -rp "$ROOTDIR"/etc/xdg/Promethean /etc/xdg

	chmod -R 777 "$ROOTDIR"/var/Promethean
	echo Copying resources...
	[ -e "$ROOTDIR/var/Promethean" ] && cp -rp "$ROOTDIR"/var/Promethean /var

	echo Copying software...
	cp -rp "$ROOTDIR"/usr/local/bin /usr/local
	cp -rp "$ROOTDIR"/usr/share /usr

	cp -rp "$ROOTDIR"/README /usr/local/bin/activsoftware
fi

which update-desktop-database && update-desktop-database &> /dev/null
#which xdg-mime && xdg-mime install /usr/share/mime/packages/promethean.xml --novendor
find /usr/share/icons -name "48x48" -exec cp /usr/share/icons/hicolor/48x48/apps/asstudio.png {}/mimetypes/application-x-asstudio.png &> /dev/null \;

DESKTOPFILE="activsoftware.desktop"
DESKTOPFILENC="activsoftware-nc.desktop"
DESKTOPPATH="/usr/share/applications/$DESKTOPFILE"
DESKTOPPATHNC="/usr/share/applications/$DESKTOPFILENC"

OIFS=$IFS
IFS="="

for h in /home/*; do
        u="`basename $h`"

        # check if it is a valid user
        if [ "`cut -f 1 -d: /etc/passwd|grep -r ^$u$`" = "$u" ]; then

                # get desktop path, could be localized per user
		USER_DIRS="$h/.config/user-dirs.dirs"
		if [ -e "$USER_DIRS" ] ; then
			DESKTOP_PATH=`grep "XDG_DESKTOP_DIR" "$USER_DIRS"`
			set -- $DESKTOP_PATH
			P=$2
			DESKTOP_DIR="$h/`basename "$P"`"
			PATH_TO_USE=`echo "$DESKTOP_DIR" | sed 's/\(.*\)./\1/'`	
		fi 

		# copy the desktop files
		[ -z "$PATH_TO_USE" ] && PATH_TO_USE="$h/Desktop"
                if [ -w "$PATH_TO_USE" ]; then
                        cp -v $DESKTOPPATH "$PATH_TO_USE"
                        chown $u "$PATH_TO_USE/$DESKTOPFILE"

                        cp $DESKTOPPATHNC "$PATH_TO_USE"
                        chown $u "$PATH_TO_USE/$DESKTOPFILENC"

		fi

        fi

done

IFS=$OIFS

activesoftware.desktop:

[Desktop Entry]
Name=ActivInspire
Comment=Promethean ActivInspire
Exec=/usr/local/bin/inspire
Icon=/usr/share/icons/hicolor/48x48/apps/asstudio.png
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Education;Promethean;Applications;
MimeType=application/x-asstudio;
StartupNotify=false

/usr/bin/inspire:

#! /bin/bash
cd /usr/local/bin/activsoftware
export LD_LIBRARY_PATH="$PWD:/usr/local/lib32:/usr/local/lib:$LD_LIBRARY_PATH"

if [ "`id -u`" = "0" ]; then
	if [ `which zenity` ]; then
		zenity --warning --text "It is not recommended to use ActivInspire as root."
	else 
	echo It is not recommended to use ActivInspire as root.
	sleep 3
	fi
fi

while [ -n "$1" ]; do
	case "$1" in
		"--nocomposite"|"-nc")
			COMPOSITE="0"
		;;
	*)
		ARGS="$ARGS $1"
	;;
	esac
	shift
done

if [ "$COMPOSITE" == "0" ]; then
	# we need to turn off compositing
	COMPIZ=`(ps -e |grep -is compiz) &> /dev/null && echo y`

	if [ "$COMPIZ" == "y" ]; then
		killall compiz
		metacity --replace &
		sleep 1
	fi

	# compiz is not running, what about metacity ?
	METACITY=`(ps -e |grep -is metacity) &> /dev/null && echo y`
	ISCOMPOSITE=`gconftool-2 --get /apps/metacity/general/compositing_manager|tr "[:upper:]" "[:lower:]"`

	if [ "$METACITY" == "y" -a "$ISCOMPOSITE" == "true" ]; then
		gconftool-2 --set /apps/metacity/general/compositing_manager --type bool false
		sleep 1
	fi 
fi

./Inspire $ARGS

# turn compositing back on if we turned it off doesn't work: metacity locks up on occasion...

if [ "$ALLOWRESTART" == "1" -a "$COMPOSITE" == "0" ]; then
	if [ "$COMPIZ" == "y" ]; then
		killall metacity
		compiz --replace &
	fi
	
	if [ "$METACITY" == "y" -a "$ISCOMPOSITE" == "true" ]; then
		killall metacity;gconftool-2 --set /apps/metacity/general/compositing_manager --type bool true;(metacity --replace&)
		sleep 2
	fi
fi

Maybe it could help you?

Offline

Board footer

Powered by FluxBB