summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYe Jingchen2017-12-09 21:46:12 +0800
committerYe Jingchen2017-12-09 21:46:12 +0800
commitb130d09a6fd00cf9b2bf4e31ce73b08dab162313 (patch)
tree76b43aeb8488162b905b1e62f37d6e77fad057a7
parentd52212f8e65216d78954fb95279fcc1a8281c91e (diff)
downloadaur-edgar-git.tar.gz
rewritten
-rw-r--r--.SRCINFO22
-rw-r--r--.gitignore32
-rw-r--r--PKGBUILD72
-rw-r--r--edgar-git.install22
4 files changed, 91 insertions, 57 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9329b39fd6c..8982b8e8488 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,23 @@
pkgbase = edgar-git
- pkgdesc = Enlightenment module: Load Python gadgets
- pkgver = 0.2.0.r32.3f954f4
+ pkgdesc = Load Python gadgets in Enlightenment
+ pkgver = r49.63b9e57
pkgrel = 1
- url = https://git.enlightenment.org/enlightenment/modules/edgar.git
- arch = i686
+ url = https://phab.enlightenment.org/w/emodules/edgar/
+ install = edgar-git.install
arch = x86_64
+ arch = i686
license = GPL3
license = LGPL3
makedepends = git
- depends = enlightenment
- depends = python-efl
- provides = edgar=0.2.0.r32.3f954f4
+ depends = enlightenment>=0.17
+ depends = python>=3.2
+ depends = python-efl>=1.11
+ depends = python-dbus
+ depends = python-psutil
+ provides = edgar
conflicts = edgar
- source = git://git.enlightenment.org/enlightenment/modules/edgar.git
- sha256sums = SKIP
+ source = git+https://git.enlightenment.org/enlightenment/modules/edgar.git
+ md5sums = SKIP
pkgname = edgar-git
diff --git a/.gitignore b/.gitignore
index 71a9d16c2b3..0a406bad9c1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,32 @@
-*~
-*/
+# This package
+edgar/
+
+# Created by https://www.gitignore.io/api/archlinuxpackages,vim
+
+### ArchLinuxPackages ###
+*.tar
*.tar.*
+*.jar
+*.exe
+*.msi
+*.zip
+*.tgz
*.log
+*.log.*
+*.sig
+
+pkg/
+src/
+
+
+### Vim ###
+# swap
+[._]*.s[a-w][a-z]
+[._]s[a-w][a-z]
+# session
+Session.vim
+# temporary
+.netrwhist
+*~
+# auto-generated tag files
+tags
diff --git a/PKGBUILD b/PKGBUILD
index 6ad66e234e1..f9958ee0e71 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,62 +1,42 @@
-# Maintainer: Doug Newgard <scimmia at archlinux dot info>
+# Maintainer: Ye Jingchen <ye[dot]jingchen[at]gmail[dot]com>
_pkgname=edgar
-pkgname=$_pkgname-git
-pkgver=0.2.0.r32.3f954f4
+pkgname=edgar-git
+pkgver=r49.63b9e57
pkgrel=1
-pkgdesc="Enlightenment module: Load Python gadgets"
-arch=('i686' 'x86_64')
-url="https://git.enlightenment.org/enlightenment/modules/edgar.git"
+pkgdesc="Load Python gadgets in Enlightenment"
+arch=('x86_64' 'i686')
+url="https://phab.enlightenment.org/w/emodules/edgar/"
license=('GPL3' 'LGPL3')
-depends=('enlightenment' 'python-efl')
+depends=('enlightenment>=0.17' 'python>=3.2' 'python-efl>=1.11' 'python-dbus'
+ 'python-psutil')
makedepends=('git')
-provides=("$_pkgname=$pkgver")
-conflicts=("$_pkgname")
-source=("git://git.enlightenment.org/enlightenment/modules/$_pkgname.git")
-sha256sums=('SKIP')
+provides=(edgar)
+conflicts=(edgar)
+install=edgar-git.install
+source=("git+https://git.enlightenment.org/enlightenment/modules/$_pkgname.git")
+md5sums=('SKIP')
pkgver() {
- cd $_pkgname
-
- local v_ver=$(awk -F , '/^AC_INIT/ {gsub(/[\[\] -]/, ""); print $2}' configure.ac)
-
- printf "$v_ver.r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
-}
-
-prepare() {
- find "$_pkgname/GADGETS" -name Makefile -exec sed -i '/^gadget_folder/ s/ = /&${DESTDIR}/' {} \;
+ cd "$srcdir/$_pkgname"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
- cd $_pkgname
-
- ./autogen.sh \
- --prefix=/usr \
- --disable-static
-
- make
-
- cd GADGETS
- for _gadget in *; do
- make -C "$_gadget"
- done
+ cd "$srcdir/$_pkgname"
+ ./autogen.sh --prefix=/usr --sysconfdir=/etc
+ make -j$(nproc)
}
package() {
- cd $_pkgname
-
- make DESTDIR="$pkgdir" install
-
- pushd GADGETS
- for _gadget in *; do
- make -C "$_gadget" DESTDIR="$pkgdir" install
- done
- popd
+ cd "$srcdir/$_pkgname"
-# compile python files
- python -m compileall -q "$pkgdir"
- python -O -m compileall -q "$pkgdir"
+ # The module
+ make DESTDIR="$pkgdir/" install
-# install text files
- install -Dm644 -t "$pkgdir/usr/share/doc/$_pkgname/" AUTHORS ChangeLog NEWS README
+ # Shipped gadgets
+ cd GADGETS
+ for gadget in *; do
+ make -C "$gadget" prefix="$pkgdir/usr/lib" install
+ done
}
diff --git a/edgar-git.install b/edgar-git.install
new file mode 100644
index 00000000000..f689d4e5b46
--- /dev/null
+++ b/edgar-git.install
@@ -0,0 +1,22 @@
+## arg 1: the new package version
+post_install() {
+ echo "You needed to load the PulseAudio DBus module for audio gadget to work."
+ echo "Run this command to load the dbus module:"
+ echo -e "\tpactl load-module module-dbus-protocol"
+ echo "You may consider adding the following line to /etc/pulse/default.pa"
+ echo -e "\tload-module module-dbus-protocol"
+ echo "for a persistent configuration"
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+post_upgrade() {
+ post_install "$1"
+}
+
+## arg 1: the old package version
+post_remove() {
+ echo "If you don't needed PulseAudio DBus module anymore (used by this audio gadget),"
+ echo "consider remove the following line in /etc/pulse/default.pa:"
+ echo -e "\tload-module module-dbus-protocol"
+}