summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTGS2016-12-17 21:40:33 -0500
committerTGS2016-12-17 21:40:33 -0500
commitd081de921b9b1fbb8df8d103f2cd0857b01d060c (patch)
tree561f3b2cd1c25525eb234eebaa35372c0687fc9d
parentb7d81d439bd8c7f38c2a7a5638c241708588d043 (diff)
downloadaur-d081de921b9b1fbb8df8d103f2cd0857b01d060c.tar.gz
Add PKGBUILD revision 2 - added .install, changelog, fixed some package() commands (make should not run twice)
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD40
-rw-r--r--README.md33
-rw-r--r--clevo-indicator-git.install37
4 files changed, 100 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a01e3848c638..fd5e6f29b25a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,15 @@
pkgbase = clevo-indicator-git
pkgdesc = Command-line fan control utility for Clevo laptops
pkgver = r17.fa0a7af
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/SkyLandTW/clevo-indicator
+ install = clevo-indicator-git.install
+ changelog = README.md
arch = x86_64
license = custom:Unlicense
makedepends = git
depends = libappindicator-gtk3
+ provides = clevo-indicator
source = clevo-indicator-git::git+https://github.com/SkyLandTW/clevo-indicator.git
md5sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index 74389ab9ae4d..36283ab3ac1c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,12 +4,14 @@
# then please put 'unknown'.
# PKGBUILD prototype location: /usr/share/pacman/PKGBUILD.proto
+# .install prototype location: /usr/share/pacman/proto.install
# Example: https://github.com/archlinuxarm/PKGBUILDs/blob/master/aur/libcrossguid-git/PKGBUILD
+# Git pkgver() examples: https://wiki.archlinux.org/index.php/VCS_package_guidelines#The_pkgver.28.29_function
# Maintainer: Tech Guy Software <techguy100official at gmail dot com>
pkgname=clevo-indicator-git
pkgver=r17.fa0a7af
-pkgrel=1
+pkgrel=2
#epoch=
pkgdesc="Command-line fan control utility for Clevo laptops"
arch=('x86_64')
@@ -18,21 +20,23 @@ license=('custom:Unlicense')
#groups=()
depends=('libappindicator-gtk3')
makedepends=('git')
-#provides=()
+provides=('clevo-indicator')
#conflicts=()
#replaces=()
#backup=()
#options=()
-#install=
-#changelog=
+install=clevo-indicator-git.install
+changelog=README.md
source=("${pkgname%}::git+https://github.com/SkyLandTW/clevo-indicator.git")
md5sums=('SKIP')
#noextract=()
#validpgpkeys=()
pkgver() {
- cd "$srcdir"/$pkgname
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ # Return most recent git revisions and shortened MD5 from package directory
+ # as a formatted string
+ cd "$srcdir"/$pkgname
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
@@ -43,21 +47,29 @@ prepare() {
build() {
cd "$pkgname"
#./configure --prefix=/usr
- make
+ make install
}
package() {
cd "$pkgname"
- make DESTDIR="$pkgdir/" install
+ #make DESTDIR="$pkgdir/" install
+
+ # move clevo-indicator binary to /usr/bin for execution
+ # in command line
+
+ echo "--> Removing existing binaries..."
+ sudo rm -f "/usr/bin/clevo-indicator"
+
echo "--> Moving files to /usr/bin..."
- sudo mv "/usr/local/bin/clevo-indicator" "/usr/bin/$pkgname"
+
+ sudo mv "/usr/local/bin/clevo-indicator" "/usr/bin/"
echo "--> Success! Run the fan control utility using the command \"clevo-indicator\" as the root user."
}
makepkgclean() {
- echo "--> Cleaning up files created by makepkg..."
- makepkg -code
- echo "--> Removing command-line script from directory..."
- cd "/usr/local/bin"
- sudo rm -rf "$pkgname"
+ echo "--> Cleaning up files created by makepkg..."
+ makepkg -code
+ echo "--> Removing command-line script/binary from /usr/local/bin directory..."
+ cd "/usr/local/bin"
+ sudo rm -rf "$pkgname"
}
diff --git a/README.md b/README.md
new file mode 100644
index 000000000000..c9b457567a97
--- /dev/null
+++ b/README.md
@@ -0,0 +1,33 @@
+# clevo-indicator-git
+This is an Arch Linux package forked from SkyLandTW's repository that lets
+you control the fan of Clevo laptops using reversed-engineering port
+information from ECView.
+
+## Packages Used
+libappindicator-gtk3 to display the tray icon (the tray icon doesn't show
+up on KDE, tested on Arch Linux)
+
+## AUR link
+https://aur.archlinux.org/packages/clevo-indicator-git/
+
+### Install instructions
+#### Build and Install from the AUR (Arch Linux)
+```shell
+sudo pacman -S clevo-indicator-git
+```
+
+This package pulls upstream git commits from the repository https://github.com/SkyLandTW/clevo-indicator.
+
+**WARNING: THIS METHOD MAY BE UNSTABLE OR BREAK AT ANY TIME**
+
+#### Build and Install from Source (Ubuntu/Arch Linux)
+
+```shell
+sudo apt-get install libappindicator-gtk3
+git clone git@github.com:SkyLandTW/clevo-indicator.git
+cd clevo-indicator
+make install
+```
+
+## Command-line documentation
+See the [DOCUMENTATION.md file](DOCUMENTATION.md).
diff --git a/clevo-indicator-git.install b/clevo-indicator-git.install
new file mode 100644
index 000000000000..8800d55a7fe5
--- /dev/null
+++ b/clevo-indicator-git.install
@@ -0,0 +1,37 @@
+# Maintainer: Tech Guy Software <techguy100official at gmail dot com>
+
+## arg 1: the new package version
+#pre_install() {
+ # do something here
+#}
+
+## arg 1: the new package version
+#post_install() {
+ # do something here
+#}
+
+## arg 1: the new package version
+## arg 2: the old package version
+#pre_upgrade() {
+ # do something here
+#}
+
+## arg 1: the new package version
+## arg 2: the old package version
+#post_upgrade() {
+ # do something here
+#}
+
+## arg 1: the old package version
+pre_remove() {
+ echo "-> Removing existing installation from /usr/bin..."
+ # remove the clevo-indicator-git directory from /usr/bin
+ sudo rm -f /usr/bin/clevo-indicator
+ echo "-> Success cleaning up existing install!"
+}
+
+## arg 1: the old package version
+#post_remove() {
+ # do something here
+#}
+