From d9b66addba21bb671cbc957c76acc1dc94a10301 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 29 Jan 2012 22:21:29 -0500 Subject: add frc-libre/smartdashboard-extension-wpicameraextension --- .../PKGBUILD | 43 +++++++++++++++++ .../SRCBUILD | 54 ++++++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100644 frc-libre/smartdashboard-extension-wpicameraextension/PKGBUILD create mode 100644 frc-libre/smartdashboard-extension-wpicameraextension/SRCBUILD diff --git a/frc-libre/smartdashboard-extension-wpicameraextension/PKGBUILD b/frc-libre/smartdashboard-extension-wpicameraextension/PKGBUILD new file mode 100644 index 0000000..ea3816c --- /dev/null +++ b/frc-libre/smartdashboard-extension-wpicameraextension/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: Luke Shumaker + +pkgname=smartdashboard-extension-wpicameraextension +pkgver=210 +pkgrel=1 +pkgdesc="WPI Camera Extension for SmartDashboard" +arch=('any') +groups=(frc) +url="http://firstforge.wpi.edu/sf/projects/smartdashboard" +license=unknown +depends=(smartdashboard-client wpijavacv) +makedepends=(apache-ant) +source=("https://gitorious.org/absfrc/sources/blobs/raw/master/$pkgname-$pkgver-$pkgrel-any.src.tar.xz") + +build() { + cd "$srcdir" + cp -a /usr/share/smartdashboard/src SmartDashboard + cp -a /usr/share/java/wpilibj/NetworkTable_Client . + cp -a /usr/share/java/WPIJavaCV . + sed -i \ + -e 's@^\(project\.NetworkTable_Client=\).*@\1../NetworkTable_Client@' \ + SmartDashboard/nbproject/project.properties + + cd "$pkgname" + sed -i \ + -e 's@^\(project\.SmartDashboard=\).*@\1../SmartDashboard@' \ + -e 's@^\(project\.WPIJavaCV=\).*@\1../WPIJavaCV@' \ + nbproject/project.properties + + ant jar +} + +package() { + install -d "$pkgdir/usr/share/smartdashboard/extensions/lib" + cd "$pkgdir/usr/share/smartdashboard/extensions" + install -m644 "$srcdir/$pkgname/dist/WPICameraExtension.jar" . + ln -s /usr/share/java/WPIJavaCV.jar lib + ln -s /usr/share/java/javacpp.jar lib + ln -s /usr/share/java/javacv.jar lib + ln -s /usr/share/java/javacv-platform.jar lib +} + +md5sums=('77c841a9e86c5197b5583717ce730f42') diff --git a/frc-libre/smartdashboard-extension-wpicameraextension/SRCBUILD b/frc-libre/smartdashboard-extension-wpicameraextension/SRCBUILD new file mode 100644 index 0000000..a14b021 --- /dev/null +++ b/frc-libre/smartdashboard-extension-wpicameraextension/SRCBUILD @@ -0,0 +1,54 @@ +# Maintainer: Luke Shumaker + +# You need to create a login at and set +# "$_svnuser" and "$_svnpass". The account creation is free and automatic. + +pkgname=smartdashboard-extension-wpicameraextension +pkgver=210 +pkgrel=1 +pkgdesc="WPI Camera Extension for SmartDashboard" +arch=('any') +groups=(frc) +url="http://firstforge.wpi.edu/sf/projects/smartdashboard" +license=unknown +makedepends=('subversion' 'findutils') +options=('!strip' 'docs' '!zipman' 'emptydirs') + +_svntrunk=http://firstforge.wpi.edu/svn/repos/smart_dashboard/trunk/extensions/camera/WPICameraExtension +_svnver=210 +_svnuser=YOURUSERNAME +_svnpass=YOURPASSWORD + +build() { + cd "$srcdir" + msg "Connecting to SVN server...." + + if [[ -d "$pkgname/.svn" ]]; then + cd "$pkgname" && svn up -r "$_svnver" + else + svn co \ + --username "$_svnuser" \ + --password "$_svnpass" \ + --config-dir ./ \ + "$_svntrunk" -r "$_svnver" "$pkgname" + fi + + msg "SVN checkout done or server timeout" + + msg "Removing .svn files..." + find . -name .svn -print0 | xargs -0 rm -rf + + msg "Removing the developer's personal files..." + cd "$srcdir/$pkgname" + rm -rfv nbproject/private + + msg "Removing precompiled binaries..." + cd "$srcdir/$pkgname" + rm -rfv dist +} + +package() { + PKGEXT=${SRCEXT} + PKGDEST=${SRCDEST} + cp -a "${srcdir}/${pkgname}" "${pkgdir}/" +} -- cgit v1.2.3-54-g00ecf