summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorWeitian Leung2015-10-02 18:09:29 +0800
committerWeitian Leung2015-10-02 18:09:29 +0800
commit335357b3be1279f42582d7f2029fe104a858bbf6 (patch)
tree68db47483895b06a9e6618c5a17c294689ef0da5
downloadaur-335357b3be1279f42582d7f2029fe104a858bbf6.tar.gz
first package
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD34
-rwxr-xr-xbing-wallpaper-autostart.sh16
-rw-r--r--bing-wallpaper.desktop12
4 files changed, 81 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..af33fdf1ecb1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = bing-wallpaper-git
+ pkgdesc = Change wallpaper from Bing daily
+ pkgver = r8.2c8d18a
+ pkgrel = 1
+ arch = any
+ license = GPL3
+ makedepends = git
+ depends = curl
+ optdepends = xorg-xrandr: for xfce4 support
+ optdepends = xfconf: for xfce4 support
+ source = bing-wallpaper-git::git+https://github.com/timxx/linux-bing-wallpaper.git
+ source = bing-wallpaper-autostart.sh
+ source = bing-wallpaper.desktop
+ md5sums = SKIP
+ md5sums = b84e976323ea41d5c53c71384bd281a8
+ md5sums = 1e65c7c30461dcc752f4766e5a14bc76
+
+pkgname = bing-wallpaper-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..60b6c3310627
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Weitian Leung <weitianleung[at]gmail[dot]com>
+
+pkgname=bing-wallpaper-git
+pkgver=r8.2c8d18a
+pkgrel=1
+pkgdesc="Change wallpaper from Bing daily"
+arch=(any)
+license=('GPL3')
+depends=('curl')
+optdepends=('xorg-xrandr: for xfce4 support'
+ 'xfconf: for xfce4 support')
+makedepends=('git')
+source=("$pkgname::git+https://github.com/timxx/linux-bing-wallpaper.git"
+ 'bing-wallpaper-autostart.sh'
+ 'bing-wallpaper.desktop')
+md5sums=('SKIP'
+ 'b84e976323ea41d5c53c71384bd281a8'
+ '1e65c7c30461dcc752f4766e5a14bc76')
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+package() {
+ install -d "$pkgdir/usr/lib/bing-wallpaper"
+ cp "$srcdir/$pkgname/"*.sh "$pkgdir/usr/lib/bing-wallpaper"
+
+ install -d "$pkgdir/usr/bin"
+ cp bing-wallpaper-autostart.sh "$pkgdir/usr/bin"
+
+ install -d "$pkgdir/etc/xdg/autostart"
+ cp bing-wallpaper.desktop "$pkgdir/etc/xdg/autostart"
+}
diff --git a/bing-wallpaper-autostart.sh b/bing-wallpaper-autostart.sh
new file mode 100755
index 000000000000..1b40b2693f8b
--- /dev/null
+++ b/bing-wallpaper-autostart.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+while true; do
+ if curl --connect-timeout 2 -s www.google.com > /dev/null ; then
+ break
+ fi
+
+ if curl --connect-timeout 2 -s www.baidu.com > /dev/null ; then
+ break
+ fi
+
+ sleep 5
+done
+
+cd /usr/lib/bing-wallpaper
+./bing_wallpaper.sh
diff --git a/bing-wallpaper.desktop b/bing-wallpaper.desktop
new file mode 100644
index 000000000000..d01bb89e20fb
--- /dev/null
+++ b/bing-wallpaper.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Name=Bing Wallpaper
+Name[zh_CN]=Bing壁纸
+Comment=Bing Wallpaper
+Comment[zh_CN]=Bing壁纸
+Exec=/usr/bin/bing-wallpaper-autostart.sh
+Type=Application
+Terminal=false
+StartupNotify=false
+X-GNOME-Autostart-Phase=Applications
+X-GNOME-AutoRestart=false
+X-GNOME-Autostart-Notify=false