summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO38
-rw-r--r--PKGBUILD94
2 files changed, 70 insertions, 62 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4b45f63c627..5dd8c519d79 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,24 @@
pkgbase = droidcam
- pkgdesc = A tool for using your android device as a wireless/usb webcam
- pkgver = 6.0
- pkgrel = 3
- url = http://www.dev47apps.com/
- install = droidcam.install
- arch = x86_64
- license = custom
- makedepends = linux-headers
- depends = bluez-libs
- depends = gtk2
- optdepends = v4l-utils: Userspace tools and conversion library for Video 4 Linux
- optdepends = xf86-video-v4l: X.org v4l video driver
- options = !strip
- source = droidcam.desktop
- source = http://www.dev47apps.com/files/41/droidcam-v4l2-.tar.gz
- sha1sums = f85b3f34f98908bd1327df0ea0e650dcbdcb07e9
+ pkgdesc = A tool for using your android device as a wireless/usb webcam
+ pkgver = 6.0
+ pkgrel = 8
+ url = https://www.dev47apps.com/droidcam/linuxx
+ install = droidcam.install
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = linux-headers
+ optdepends = v4l-utils: Userspace tools and conversion library for Video 4 Linux
+ optdepends = gtk2: use GUI version in addition to CLI interface
+ noextract = droidcam.tar.bz2
+ options = !strip
+ source = droidcam.desktop
+ source = https://github.com/aramg/droidcam/raw/master/linux/icon2.png
+ md5sums = 199d8f3dbc6697f06350b00de99f2274
+ md5sums = 0f0e1d04146dd5be70d5028f144bd0a2
+ source_i686 = droidcam.tar.bz2::https://www.dev47apps.com/files/600/droidcam-32bit.tar.bz2
+ md5sums_i686 = b4b4bb43a4e4a46aab2c1b38cd0892c3
+ source_x86_64 = droidcam.tar.bz2::https://www.dev47apps.com/files/600/droidcam-64bit.tar.bz2
+ md5sums_x86_64 = 743b71f1af4d90b5ced59c02fcbc925f
pkgname = droidcam
-
diff --git a/PKGBUILD b/PKGBUILD
index 41ff904fa42..262414ca36a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,58 +1,62 @@
-# Maintainer: AwesomeHaircut <jesusbalbastro at gmail com>
+# Maintainer: James An <james@jamesan.ca>
+# Contributor: AwesomeHaircut <jesusbalbastro at gmail com>
pkgname=droidcam
pkgver=6.0
-pkgrel=3
-_kver="`uname -r | cut -d"." -f1,2`-ARCH"
+pkgrel=8
pkgdesc='A tool for using your android device as a wireless/usb webcam'
-arch=('x86_64')
-url='http://www.dev47apps.com/'
+arch=('i686' 'x86_64')
+url="https://www.dev47apps.com/$pkgname/linuxx"
license=('custom')
-depends=( 'bluez-libs' 'gtk2')
makedepends=( 'linux-headers' )
options=('!strip')
optdepends=('v4l-utils: Userspace tools and conversion library for Video 4 Linux'
- 'xf86-video-v4l: X.org v4l video driver' )
+ 'gtk2: use GUI version in addition to CLI interface' )
install="$pkgname.install"
+source=("$pkgname.desktop"
+ "https://github.com/aramg/$pkgname/raw/master/linux/icon2.png")
+source_i686=("$pkgname.tar.bz2"::"https://www.dev47apps.com/files/600/$pkgname-32bit.tar.bz2")
+source_x86_64=("$pkgname.tar.bz2"::"https://www.dev47apps.com/files/600/$pkgname-64bit.tar.bz2")
+noextract=("$pkgname.tar.bz2")
+md5sums=('199d8f3dbc6697f06350b00de99f2274'
+ '0f0e1d04146dd5be70d5028f144bd0a2')
+md5sums_i686=('b4b4bb43a4e4a46aab2c1b38cd0892c3')
+md5sums_x86_64=('743b71f1af4d90b5ced59c02fcbc925f')
+
+prepare() {
+ # Extract source from within leading arcqh-specific folder
+ tar --transform='s/-\(32\|64\)bit//' --show-transformed-names -xjf "$pkgname.tar.bz2"
+ cd "$pkgname"
+
+ # Generate the module loading configuration files
+ cat <<EOF >| "v4l2loopback/$pkgname.modules-load.conf"
+videodev
+v4l2loopback_dc
+EOF
+ echo "options v4l2loopback_dc width=320 height=240" >| "v4l2loopback/$pkgname.modprobe.conf"
+}
-source=("$pkgname.desktop" )
-
-sha1sums=( 'f85b3f34f98908bd1327df0ea0e650dcbdcb07e9')
-
-## as of 2015-11-11 only x64 is available for 6.0
-[[ "${CARCH}" = "x86_64" ]] && _arch="x64" && sha1sums+=('0c1d6c7b0298e5ec935aa1a93a80529d8a02c9a9')
-
-source+=("http://files.dev47apps.net/600/droidcam-v4l2-${_arch}.tar.gz")
+build() {
+ cd "$pkgname/v4l2loopback"
+ make
+ gzip -f v4l2loopback-dc.ko
+}
package() {
- # Install droidcam binary file
- cd $pkgdir
- mkdir -p "$pkgdir"/usr/bin
- install -m755 "$srcdir"/${pkgname} "$pkgdir"/usr/bin/${pkgname}
- install -m755 "$srcdir"/${pkgname}-cli "$pkgdir"/usr/bin/${pkgname}-cli
-
- # Install the desktop icon and ".desktop" files
- install -dm0755 "${pkgdir}/usr/share/"{applications,pixmaps}
- install -m0644 "${srcdir}/icon2.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
- install -m0644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
-
- mkdir -p "$pkgdir"/usr/lib/modules-load.d/
- printf "videodev\nv4l2loopback\nv4l2loopback_dc" \
- > "$pkgdir"/usr/lib/modules-load.d/droidcam.conf
-
- mkdir -p "$pkgdir"/etc/modprobe.d/
- printf "options v4l2loopback_dc width=320 height=240" \
- > "$pkgdir"/etc/modprobe.d/droidcam.conf
-
- # Install doc
- install -dm0755 "${pkgdir}/usr/share/licenses/${pkgname}"
- install -m0644 "${srcdir}/README" "${pkgdir}/usr/share/licenses/$pkgname/README"
-
- # Install modules
- cd $srcdir/v4l2loopback
- sed -i -e "s,vdev->current_norm,//vdev->current_norm,g" "$srcdir"/v4l2loopback/*.c
- make
- _extramodules="extramodules-$(uname -r | cut -f-2 -d'.')-$(uname -r|sed -e 's/.*-//g')"
- MODPATH="${pkgdir}/usr/lib/modules/${_extramodules}/"
- install -Dm644 v4l2loopback-dc.ko "$MODPATH/v4l2loopback_dc.ko"
+ cd "$pkgname"
+
+ # Install droidcam program files
+ install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname"
+ install -Dm755 "$pkgname-cli" "$pkgdir/usr/bin/$pkgname-cli"
+ install -Dm644 ../icon2.png "$pkgdir/usr/share/pixmaps/$pkgname.png"
+ install -Dm644 "../$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
+ install -Dm644 README "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ # Install kernel module and config files
+ cd v4l2loopback
+ MODPATH="/usr/lib/modules/extramodules-$(uname -r | sed 's/\.[0-9]\+-[0-9]\+//')"
+ install -Dm644 v4l2loopback-dc.ko.gz "$pkgdir$MODPATH/v4l2loopback_dc.ko.gz"
+ install -Dm644 "$pkgname.modules-load.conf" "$pkgdir/usr/lib/modules-load.d/$pkgname.conf"
+ install -Dm644 "$pkgname.modprobe.conf" "$pkgdir/etc/modprobe.d/$pkgname.conf"
+
}