Help to compile overlook-fing package

Problems with packages? Post here, using [tags] of the package name.

Help to compile overlook-fing package

Postby salan54 » Mon May 20, 2013 10:53 am

Hi everybody,

I am the maintainer for the overlook-fing package on AUR. https://aur.archlinux.org/packages/overlook-fing
fing is a tool for network scanning, discovery and alerting which could be connected to the overlook-fing monitoring system. They have a lot of pre-build packages to download on
http://www.overlooksoft.com/download
(no sources to my knowledge). The packages I use for the AUR are the TGZ 64 & 32 bits. They recently made a DEB available for Raspberry Pi. I downloaded the .deb wishing to make an AUR package available to ARM users, but I am stuck... I'm just good ;-) to make (or adapt) PKGBUILD's...

Could someone help me or give a few cues to have this .deb ported to AUR.
Many thanks
Salan54
salan54
 
Posts: 3
Joined: Mon May 20, 2013 10:35 am

Re: Help to compile overlook-fing package

Postby moonman » Tue May 21, 2013 5:54 am

What are you stuck with? just extract deb with ar
ar x <file.deb>

then extract the data.tar.gz with
tar xzf data.tar.gz

now copy files to the appropriates dirs in $pkgdir and add the service file

for arch only include armv6h (arch=('armv6h')) since the package is only available for arm v6.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: Help to compile overlook-fing package

Postby salan54 » Tue May 21, 2013 9:44 pm

Thanks a lot moonman.

With your help, I was able to modify the initial PKGBUILD :
$this->bbcode_second_pass_code('', '
# Contributor: Piotr Rogoża <rogoza dot piotr at gmail dot com>
# Created: 08/12/2010
# Maintainer: Salan54 <salan at fremenil dot com>
# Modified: 05/21/2013
pkgname=overlook-fing
pkgver=2.2
pkgrel=1
_altpkgname=fing
pkgdesc='The ultimate tool for network discovery and scanning'
arch=('armv6h')
url='http://www.overlooksoft.com/'
license=('custom:Overlook Freeware license')
depends=('boost-libs' 'openssl' 'zlib')
options=(!strip)

case $CARCH in
armv6h)

source=("${pkgname}-${pkgver}.deb::http://www.overlooksoft.com/packages/arm/${pkgname}-${pkgver}.deb"
"fingbox-sentinel.service"
"fingbox-sentinel.script"
)
md5sums=('3303e2785f2e82ef111af15059099cab' '013488a7afe3048524df6b7527faae69' '95dbef149b9d3a9ea3bac0bd0c77b343')
;;

esac

build() {
cd "$srcdir"
tar xvzf data.tar.gz
}

package() {
cd "$srcdir"
cp -r usr $pkgdir/
install -dm755 "${pkgdir}"/etc/${_altpkgname}
install -dm755 "${pkgdir}"/var/data/${_altpkgname}/{box,sentinel}
install -dm755 "${pkgdir}"/var/log/${_altpkgname}

install -Dm644 ./usr/share/${_altpkgname}/template/conf/sentinel.txt "${pkgdir}"/var/data/${_altpkgname}/sentinel/
install -Dm644 ./usr/share/${_altpkgname}/template/conf/*.properties "${pkgdir}"/etc/${_altpkgname}/

# systemd & fingbox-sentinel
install -Dm755 fingbox-sentinel.service "${pkgdir}"/usr/lib/systemd/system/fingbox-sentinel.service
install -Dm755 fingbox-sentinel.script "${pkgdir}"/usr/lib/systemd/scripts/fingbox-sentinel

# license
install -dm755 "${pkgdir}"/usr/share/licenses/${_altpkgname}
ln -s /usr/share/${_altpkgname}/doc/license.txt "${pkgdir}"/usr/share/licenses/${_altpkgname}/license

#libpcap.so.0.8
ln -s /usr/lib/libpcap.so.1.4.0 "${pkgdir}"/usr/lib/libpcap.so.0.8
}
')

I still have 2 questions :
    I am not very sure with the line 'ln -s /usr/lib/libpcap.so.1.4.0...' : Without this line, I get a runtime error because the package is pre-built with libpcap.0.8 and the current version in the arm arch is libpcap.1.4 . With this link, it works but is there another way more correct to get it working ?
    In the current AUR, there is already a package named overlook-fing with version for architecture i686 and x86_64. May I upload the arm package to AUR ? What would be the correct name : 'arm-overlook-fing' ?

Thanks for your help
Salan
salan54
 
Posts: 3
Joined: Mon May 20, 2013 10:35 am

Re: Help to compile overlook-fing package

Postby moonman » Wed May 22, 2013 11:16 am

rename the executable to something else and create a script with original executable's name. In the script use LD_PRELOAD

$this->bbcode_second_pass_code('', 'LD_PRELOAD=/path/to/my/lib /path/to/executable')

you can call it what you want, I would probably append "arm" at the end. Don't know what's best.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: Help to compile overlook-fing package

Postby salan54 » Wed May 22, 2013 11:23 am

OK. I got it.
Thanks
salan54
 
Posts: 3
Joined: Mon May 20, 2013 10:35 am

Re: Help to compile overlook-fing package

Postby moonman » Thu May 23, 2013 12:32 am

Since you are managing the other (x86/x64) PKGBUILD, you could probably just merge all this into it to avoid creating a new unnecessary PKGBUILD
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am


Return to Packages

Who is online

Users browsing this forum: No registered users and 13 guests