summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMateusz Gozdek2020-06-06 23:22:57 +0200
committerMateusz Gozdek2020-06-06 23:55:39 +0200
commitef4cb7d793f1affdb0de884deda8b4ca45006d05 (patch)
tree05cd1aaa04d5b0f1842e2ae4375678024591d4f9
parent660a90cf900a3741fe381d10c21a3bd2e785f3dc (diff)
downloadaur-ef4cb7d793f1affdb0de884deda8b4ca45006d05.tar.gz
Use split package to also manage v4l2loopback-dc-dkms package
As they are both build from the same source. Signed-off-by: Mateusz Gozdek <mgozdekof@gmail.com>
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD76
-rw-r--r--dkms.conf6
3 files changed, 77 insertions, 28 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 08ba75f392f..3634e29f78f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,23 +1,30 @@
pkgbase = droidcam
pkgdesc = A tool for using your android device as a wireless/usb webcam
pkgver = 1.3
- pkgrel = 1
+ pkgrel = 2
epoch = 1
url = https://github.com/aramg/droidcam
arch = x86_64
license = GPL
makedepends = gtk3
- depends = v4l2loopback-dc-dkms
- depends = alsa-lib
- depends = libjpeg-turbo
- depends = ffmpeg
- optdepends = gtk3: use GUI version in addition to CLI interface
+ makedepends = ffmpeg
+ backup = etc/modprobe.d/droidcam.conf
source = droidcam.desktop
- source = droidcam-1.3.zip::https://github.com/aramg/droidcam/archive/v1.3.zip
+ source = dkms.conf
source = droidcam.conf
+ source = droidcam-1.3.zip::https://github.com/aramg/droidcam/archive/v1.3.zip
sha512sums = 72d21aa2d7eecc9bb070aaf7059a671246feb22f9c39b934a5463a4839f9347050de00754e5031dbc44f78eb2731f58f0cd2fcf781bc241f6fbd1abb4308b7ee
- sha512sums = c783b62c530c521aa7f047073efe74b57f28fbadbd097dca595fb582820566aedd03c6e92d2f24d9ff84dceed8ab51955ad77e80481ebfb6e30423425f8f2953
+ sha512sums = 27848dc6825c965c0aaac8e86220c3916ba20df6d941f5f05caecbf9c329ee744ee883bd2638ba58fe0dc3f40a8ae804dafbfbbe2efc23237e2b5450606cb78d
sha512sums = ea457b46a2fc9f1a3ea8e99f2cd0771a587cff89f42335fdaf55988dda0376a1fea73b660174c9f1906a304bace68bffec30b70b20dafc05ebae8854d9aadb13
+ sha512sums = c783b62c530c521aa7f047073efe74b57f28fbadbd097dca595fb582820566aedd03c6e92d2f24d9ff84dceed8ab51955ad77e80481ebfb6e30423425f8f2953
pkgname = droidcam
+ depends = alsa-lib
+ depends = libjpeg-turbo
+ depends = ffmpeg
+ depends = v4l2loopback-dc-dkms
+ optdepends = gtk3: use GUI version in addition to CLI interface
+
+pkgname = v4l2loopback-dc-dkms
+ depends = dkms
diff --git a/PKGBUILD b/PKGBUILD
index 1772d82a1b6..fc9a094f19b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,43 +3,79 @@
# Contributor: Rein Fernhout <public@reinfernhout.xyz>
# Past Contributor: James An <james@jamesan.ca>
-pkgname=droidcam
+pkgbase=droidcam
+pkgname=('droidcam' 'v4l2loopback-dc-dkms')
pkgver=1.3
-pkgrel=1
+pkgrel=2
epoch=1
pkgdesc='A tool for using your android device as a wireless/usb webcam'
arch=('x86_64')
-url="https://github.com/aramg/${pkgname}"
+url="https://github.com/aramg/${pkgbase}"
license=('GPL')
-depends=('v4l2loopback-dc-dkms' 'alsa-lib' 'libjpeg-turbo' 'ffmpeg')
-makedepends=('gtk3')
-optdepends=('gtk3: use GUI version in addition to CLI interface' )
+backup=("etc/modprobe.d/${pkgbase}.conf")
+makedepends=('gtk3' 'ffmpeg')
-source=("${pkgname}.desktop"
- "${pkgname}-${pkgver}.zip::${url}/archive/v${pkgver}.zip"
- "${pkgname}.conf"
+source=("${pkgbase}.desktop"
+ "dkms.conf"
+ "${pkgbase}.conf"
+ "${pkgbase}-${pkgver}.zip::${url}/archive/v${pkgver}.zip"
)
sha512sums=('72d21aa2d7eecc9bb070aaf7059a671246feb22f9c39b934a5463a4839f9347050de00754e5031dbc44f78eb2731f58f0cd2fcf781bc241f6fbd1abb4308b7ee'
- 'c783b62c530c521aa7f047073efe74b57f28fbadbd097dca595fb582820566aedd03c6e92d2f24d9ff84dceed8ab51955ad77e80481ebfb6e30423425f8f2953'
- 'ea457b46a2fc9f1a3ea8e99f2cd0771a587cff89f42335fdaf55988dda0376a1fea73b660174c9f1906a304bace68bffec30b70b20dafc05ebae8854d9aadb13')
+ '27848dc6825c965c0aaac8e86220c3916ba20df6d941f5f05caecbf9c329ee744ee883bd2638ba58fe0dc3f40a8ae804dafbfbbe2efc23237e2b5450606cb78d'
+ 'ea457b46a2fc9f1a3ea8e99f2cd0771a587cff89f42335fdaf55988dda0376a1fea73b660174c9f1906a304bace68bffec30b70b20dafc05ebae8854d9aadb13'
+ 'c783b62c530c521aa7f047073efe74b57f28fbadbd097dca595fb582820566aedd03c6e92d2f24d9ff84dceed8ab51955ad77e80481ebfb6e30423425f8f2953')
+
+prepare() {
+ # Generate the module loading configuration files
+ echo "options v4l2loopback_dc width=640 height=480" >| "${pkgbase}.modprobe.conf"
+}
build() {
- cd ${pkgname}-${pkgver}/linux
+ cd ${pkgbase}-${pkgver}/linux
# All JPEG* parameters are needed to use shared version of libturbojpeg instead of
# static one.
make JPEG_DIR="" JPEG_INCLUDE="" JPEG_LIB="" JPEG=$(pkg-config --libs --cflags libturbojpeg)
}
-package() {
- pushd ${pkgname}-${pkgver}/linux
+package_droidcam() {
+ depends=('alsa-lib' 'libjpeg-turbo' 'ffmpeg' 'v4l2loopback-dc-dkms')
+ optdepends=('gtk3: use GUI version in addition to CLI interface' )
+
+ pushd ${pkgbase}-${pkgver}/linux
# 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 "../../${pkgname}.conf" "${pkgdir}/etc/modules-load.d/droidcam.conf"
- install -Dm644 README.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -Dm755 "${pkgbase}" "$pkgdir/usr/bin/${pkgbase}"
+ install -Dm755 "${pkgbase}-cli" "$pkgdir/usr/bin/${pkgbase}-cli"
+ install -Dm644 icon2.png "$pkgdir/usr/share/pixmaps/${pkgbase}.png"
+ install -Dm644 "../../${pkgbase}.desktop" "$pkgdir/usr/share/applications/${pkgbase}.desktop"
+ install -Dm644 "../../${pkgbase}.conf" "${pkgdir}/etc/modules-load.d/${pkgbase}.conf"
+ install -Dm644 README.md "$pkgdir/usr/share/licenses/${pkgbase}/LICENSE"
+}
+
+package_v4l2loopback-dc-dkms() {
+ depends=('dkms')
+ _pkgname=v4l2loopback-dc
+ local install_dir="${pkgdir}/usr/src/${_pkgname}-${pkgver}"
+
+ # Copy dkms.conf
+ install -Dm644 dkms.conf "${install_dir}/dkms.conf"
+
+ # Set name and version
+ sed -e "s/@_PKGNAME@/${_pkgname}/" -e "s/@PKGVER@/${pkgver}/" -i "${install_dir}/dkms.conf"
+
+ # Install module loading configuration
+ install -Dm644 "${pkgbase}.modprobe.conf" "$pkgdir/etc/modprobe.d/${pkgbase}.conf"
+
+ # Install module source
+ cd ${pkgbase}-${pkgver}/linux/v4l2loopback
+
+ for d in $(find . -type d); do
+ install -dm755 "${install_dir}/$d"
+ done
+
+ for f in $(find . -type f ! -name '.gitignore'); do
+ install -m644 "$f" "${install_dir}/$f"
+ done
}
diff --git a/dkms.conf b/dkms.conf
new file mode 100644
index 00000000000..09f460bc779
--- /dev/null
+++ b/dkms.conf
@@ -0,0 +1,6 @@
+PACKAGE_NAME="@_PKGNAME@"
+PACKAGE_VERSION="@PKGVER@"
+MAKE[0]="make"
+BUILT_MODULE_NAME[0]="@_PKGNAME@"
+DEST_MODULE_LOCATION[0]="/extramodules"
+AUTOINSTALL="yes"