updated on Sun Jan 15 20:01:04 UTC 2012
[aur-mirror.git] / droidcam / PKGBUILD
blob6e6ee47f1eb50e6cf94e99eca967751dcc427303
1 # Contributor: Marco A Rojas <marquicus at gmail dot com>
3 pkgname=droidcam
4 pkgver=3.2.1
5 pkgrel=3
6 pkgdesc='A tool for using your android device as a wireless/usb webcam'
7 arch=('i686' 'x86_64')
8 url='http://www.dev47apps.com/'
9 license=('custom')
10 depends=('linux-headers' 'glibc' 'glib2' 'pcre' 'freetype2' 'gdk-pixbuf2' 'gtk2' 'pango')
11 options=('!strip')
12 optdepends=('v4l-utils: Userspace tools and conversion library for Video 4 Linux'
13              'xf86-video-v4l: X.org v4l video driver')
14 install='droidcam.install'
15 _arch='x86'
16 [ "${CARCH}" = 'x86_64' ] && _arch='x64'
17 source=("http://www.dev47apps.com/files/droidcam-${_arch}.tar.gz"
18         "droidcam.rc"
19         "droidcam.desktop"
20         "install.patch")
21         
22 sha1sums=('9f8db27e02e263c084e8e9957e1cda56d9a0133c'
23           '3887b0dcde9add66441b420956c276533726fb82'
24           'f85b3f34f98908bd1327df0ea0e650dcbdcb07e9'
25           'e5930f5926358386ce22f990e786d002e04c5d24')
26           
27 [[ "${CARCH}" = 'x86_64' ]] && sha1sums[0]='51ef9c075ad2e5fd057d9f54f004a047e065b563'
29 build() {
30   cd $srcdir
31   patch -p0 < ${srcdir}/install.patch
34 package() {
36   # Install droidcam binary file
37   cd $pkgdir
38   mkdir -p usr/bin
39   install -m755 ${srcdir}/${pkgname} $pkgdir/usr/bin/${pkgname}
41   # Install droidcam initscript
42   install -Dm0755 "${srcdir}/${pkgname}.rc" "${pkgdir}/etc/rc.d/${pkgname}"
43   
44   # Install the desktop icon and ".desktop" files
45   install -dm0755 "${pkgdir}/usr/"{share/applications,share/pixmaps,share/$pkgname}
46   install -m0644 "${srcdir}/icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
47   install -m0644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
49   # Install doc
50   install -dm0755 "${pkgdir}/usr/share/doc/${pkgname}"
51   install -m0644 "${srcdir}/README" "${pkgdir}/usr/share/doc/$pkgname/README"
53   # Install module sources
54   install -dm0755 "${pkgdir}/usr/src/${pkgname}-${pkgver}"
55   install -m0755 "${srcdir}/install" "${pkgdir}/usr/src/${pkgname}-${pkgver}/install"
56   cp -a "${srcdir}/webcam" "${pkgdir}/usr/src/${pkgname}-${pkgver}/"
58   # Write the build module file 
59   echo "# Droidcam installation directory" > "${pkgdir}/usr/share/${pkgname}/build_tmp"
60   echo "cd /usr/src/${pkgname}-${pkgver}" >> "${pkgdir}/usr/share/${pkgname}/build_tmp"
61   echo "./install" >> "${pkgdir}/usr/share/${pkgname}/build_tmp"
62   echo "cd -" >> "${pkgdir}/usr/share/${pkgname}/build_tmp"
63   chmod 0755 "${pkgdir}/usr/share/${pkgname}/build_tmp"
67 # End of file
68 # vim: set ts=2 sw=2 noet: