summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Nagy2015-06-08 19:40:04 +0200
committerDaniel Nagy2015-06-08 19:40:04 +0200
commit96550c3c926b10980c24bc87c500e384e98b94f6 (patch)
tree10d8a7e34c4254ca1e4966beb1a22e79e043abaf
downloadaur-96550c3c926b10980c24bc87c500e384e98b94f6.tar.gz
import to aur4
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD63
-rw-r--r--droidcam.desktop10
-rw-r--r--droidcam.install14
4 files changed, 108 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..c5d981caef3
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = droidcam
+ pkgdesc = A tool for using your android device as a wireless/usb webcam
+ pkgver = 4.1
+ pkgrel = 2
+ url = http://www.dev47apps.com/
+ install = droidcam.install
+ arch = i686
+ 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
+
+pkgname = droidcam
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..712471981b2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,63 @@
+# Maintainer: Daniel Nagy <danielnagy at gmx de>
+
+pkgname=droidcam
+pkgver=4.1
+pkgrel=2
+_kver="`uname -r | cut -d"." -f1,2`-ARCH"
+pkgdesc='A tool for using your android device as a wireless/usb webcam'
+arch=('i686' 'x86_64')
+url='http://www.dev47apps.com/'
+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' )
+install="$pkgname.install"
+
+source=("$pkgname.desktop" )
+
+sha1sums=( 'f85b3f34f98908bd1327df0ea0e650dcbdcb07e9')
+
+## as of 2013-10-29 these hash sums worked. But as of 2014-02-03 somethings changed and
+## the new hash sums are listed below.
+## [[ "${CARCH}" = "i686" ]] && _arch="x86" && sha1sums+=('64fad1b28169f1f5a3cdd03175fac5973fe5d0ef')
+## [[ "${CARCH}" = "x86_64" ]] && _arch="x64" && sha1sums+=('982ecb2fb2c30adc2fb7f3a2c250ce65b5d40777')
+
+[[ "${CARCH}" = "i686" ]] && _arch="x86" && sha1sums+=('5b00632275a2c09551d1c72703732150b1f685fe')
+[[ "${CARCH}" = "x86_64" ]] && _arch="x64" && sha1sums+=('79166f6439a1bebfd83c8a1190cf67065c60951e')
+
+source+=("http://www.dev47apps.com/files/41/droidcam-v4l2-${_arch}.tar.gz")
+
+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"
+}
diff --git a/droidcam.desktop b/droidcam.desktop
new file mode 100644
index 00000000000..b180df821a4
--- /dev/null
+++ b/droidcam.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=3.2.1
+Name=Droidcam
+Type=Application
+Exec=droidcam
+Icon=droidcam
+Categories=GNOME;AudioVideo;
+Comment=A tool for using your Android phone as a wireless/usb webcam
+
diff --git a/droidcam.install b/droidcam.install
new file mode 100644
index 00000000000..accab0a0bbd
--- /dev/null
+++ b/droidcam.install
@@ -0,0 +1,14 @@
+post_install() {
+ _extramodules="extramodules-$(uname -r | cut -f-2 -d'.')-$(uname -r|sed -e 's/.*-//g')"
+ depmod $(cat /usr/lib/modules/${_extramodules}/version)
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
+
+# vim: ts=2 sw=2 et: