Date: Wednesday, July 25, 2018 @ 04:55:14
  Author: felixonmars
Revision: 363344

upgpkg: deepin-wallpapers 1:1.7.5-2

add community wallpapers

Modified:
  deepin-wallpapers/trunk/PKGBUILD

----------+
 PKGBUILD |   42 ++++++++++++++++++++++++++++++++----------
 1 file changed, 32 insertions(+), 10 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2018-07-25 04:36:52 UTC (rev 363343)
+++ PKGBUILD    2018-07-25 04:55:14 UTC (rev 363344)
@@ -3,9 +3,10 @@
 # Contributor: Josip Ponjavic <josipponjavic at gmail dot com>
 # Contributor: Xu Fasheng <fasheng.xu[AT]gmail.com>
 
-pkgname=deepin-wallpapers
+pkgbase=deepin-wallpapers
+pkgname=(deepin-wallpapers deepin-community-wallpapers)
 pkgver=1.7.5
-pkgrel=1
+pkgrel=2
 epoch=1
 pkgdesc='Deepin Wallpapers'
 arch=('any')
@@ -12,22 +13,31 @@
 license=('GPL')
 url="https://github.com/linuxdeepin/deepin-wallpapers";
 makedepends=('deepin-api')
-groups=('deepin')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/deepin-wallpapers/archive/$pkgver.tar.gz";)
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/linuxdeepin/deepin-wallpapers/archive/$pkgver.tar.gz";)
 
sha512sums=('6f21a2311fde6f0967dd4f41a7ef1c5f1c03c291827a9918ad3d40df16f718083a8959cecfa27639245e06c4f7ad430eb2262051efa4166312c837f9503ac0f5')
 
 prepare() {
-  cd $pkgname-$pkgver
-  rm deepin-private/*
+  cd $pkgbase-$pkgver
+  cp -a "$srcdir"/$pkgbase-$pkgver{,-community}
 }
 
 build() {
-  cd $pkgname-$pkgver
-  make
+  cd "$srcdir"/$pkgbase-$pkgver
+  for _pic in deepin/*; do
+    make PICS=$_pic
+  done
+
+  cd "$srcdir"/$pkgbase-$pkgver-community
+  for _pic in deepin-community/*; do
+    make PICS=$_pic
+  done
 }
 
-package() {
-  cd $pkgname-$pkgver
+package_deepin-wallpapers() {
+  pkgdesc='Default wallpapers for DDE'
+  groups=('deepin')
+
+  cd $pkgbase-$pkgver
   install -dm755 "$pkgdir"/usr/share/wallpapers
   cp -r deepin "$pkgdir"/usr/share/wallpapers/
 
@@ -40,3 +50,15 @@
   ln -s $(echo -n /usr/share/wallpapers/deepin/Hummingbird_by_Shu_Le.jpg | 
md5sum | cut -d " " -f 1).jpg \
         "$pkgdir"/var/cache/image-blur/$(echo -n 
/usr/share/backgrounds/deepin/desktop.jpg | md5sum | cut -d " " -f 1).jpg
 }
+
+package_deepin-community-wallpapers() {
+  pkgdesc='Community wallpapers for DDE'
+  groups=('deepin-extra')
+
+  cd $pkgbase-$pkgver-community
+  install -dm755 "$pkgdir"/usr/share/wallpapers/deepin
+  cp deepin-community/* "$pkgdir"/usr/share/wallpapers/deepin/
+
+  install -dm755 "$pkgdir"/var/cache
+  cp -r image-blur "$pkgdir"/var/cache/
+}
\ No newline at end of file

Reply via email to