summaryrefslogtreecommitdiff
path: root/frc-libre/smartdashboard-extension-wpicameraextension/SRCBUILD
blob: a14b02100d09020418609f63e4ba6e44d1e5b2df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>

# You need to create a login at <http://firstforge.wpi.edu/sf> 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}/"
}