summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Lyapunov2015-11-24 16:34:12 +0300
committerIvan Lyapunov2015-11-24 16:34:12 +0300
commita529690668a3fe4720b84a13c9f990db3e7af0eb (patch)
treeec284aba6c6315cc98ae99b86076589ebf97f585
downloadaur-a529690668a3fe4720b84a13c9f990db3e7af0eb.tar.gz
initial build
-rw-r--r--.INSTALL97
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD23
3 files changed, 136 insertions, 0 deletions
diff --git a/.INSTALL b/.INSTALL
new file mode 100644
index 000000000000..8c020ceb2bc8
--- /dev/null
+++ b/.INSTALL
@@ -0,0 +1,97 @@
+function cmd_present() {
+ command -v "$1" >/dev/null 2>&1
+}
+
+
+#The script is run right before files are extracted. One argument is passed: new package version.
+function pre_install() {
+ echo ""
+}
+
+#The script is run right after files are extracted. One argument is passed: new package version.
+function post_install() {
+ BASE_TC_PATH="/opt/trueconf"
+ STARTUP_SCRIPT="${BASE_TC_PATH}/trueconf-client"
+ AUTORUN_SCRIPT="${BASE_TC_PATH}/trueconf-client-autostart"
+
+ chmod a+x ${STARTUP_SCRIPT}
+ chmod a+x ${AUTORUN_SCRIPT}
+
+ #create symbolic link to executable
+ LINK_FILE="/usr/bin/trueconf"
+ if [ -f ${LINK_FILE} ]; then
+ rm ${LINK_FILE}
+ fi
+
+ if [ ! -f ${LINK_FILE} ]; then
+ ln -s -f ${STARTUP_SCRIPT} ${LINK_FILE}
+ fi
+ # ~create symbolic link to executable
+
+ # final preparation
+ XDG_DESKTOP_MENU=`which xdg-desktop-menu 2> /dev/null`
+ if [ ! -x "$XDG_DESKTOP_MENU" ]; then
+ echo "WARNING: Could not find xdg-desktop-menu" >&2
+ else
+ "$XDG_DESKTOP_MENU" install --novendor --mode system /opt/trueconf/trueconf.desktop
+ "$XDG_DESKTOP_MENU" forceupdate --mode system
+ fi
+ # ~ final preparation
+
+ # restart application if running
+ pid=`ps axco pid,command | awk '$2 == "trueconf-bin" {print $1; }'`
+
+ if [ -n "$pid" ]; then
+ for process in "$pid"; do
+ kill -s 50 $process
+ done
+
+ fi
+}
+
+#The script is run right before files are extracted. Two arguments are passed in the following order: new package version, old package version.
+function pre_upgrade() {
+ echo ""
+}
+
+#The script is run right after files are extracted. Two arguments are passed in the following order: new package version, old package version.
+function post_upgrade() {
+ post_install
+}
+
+#The script is run right before files are removed. One argument is passed: old package version.
+function pre_remove() {
+ # remove autostart files
+ autostart_dir="${HOME}/.config/autostart"
+ if [ -f ${autostart_dir}/trueconf.desktop ]; then
+ rm ${autostart_dir}/trueconf.desktop
+ fi
+
+ if [ -f ${autostart_dir}/trueconf-autostart.desktop ]; then
+ rm ${autostart_dir}/trueconf-autostart.desktop
+ fi
+ # ~remove autostart files
+
+ # remove application data
+ for USER_DIR in $(ls -d /home/*)
+ do
+ DATA_DIR="${USER_DIR}/.config/trueconf"
+ if [ -d "${DATA_DIR}" ]; then
+ rm -rf "${DATA_DIR}"
+ fi
+ done
+ # ~remove application data
+
+ # uninstall menu file and update system menu
+ #"$XDG_DESKTOP_MENU" uninstall --novendor --mode system /opt/trueconf/trueconf.desktop
+ #"$XDG_DESKTOP_MENU" forceupdate --mode system
+ # ~uninstall menu file and update system menu
+}
+
+#The script is run right after files are removed. One argument is passed: old package version.
+function post_remove() {
+ LINK_FILE="/usr/bin/trueconf"
+ if [ -f ${LINK_FILE} ]; then
+ rm ${LINK_FILE}
+ fi
+} \ No newline at end of file
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..79987f0d8e20
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = trueconf
+ pkgdesc = SystemTap provides free software (GPL) infrastructure to simplify the gathering of information about the running Linux system.
+ pkgver = 1.3.1.1038
+ pkgrel = 1
+ url = http://trueconf.com/
+ install = .INSTALL
+ arch = x86_64
+ license = custom:TrueConf
+ depends = elfutils
+ depends = nss
+ depends = python2
+ source = http://www.trueconf.ru/download/beta/trueconf-client-1.3.1.1038-amd64.pkg.tar.xz
+ sha1sums = 350e2fa3ba24d99eceb1544421f4998fa2a8b52b
+
+pkgname = trueconf
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ae8f41720f18
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,23 @@
+pkgname=trueconf
+pkgver=1.3.1.1038
+pkgrel=1
+pkgdesc="SystemTap provides free software (GPL) infrastructure to simplify the gathering of information about the running Linux system."
+url="http://trueconf.com/"
+arch=('x86_64')
+license=('custom:TrueConf')
+depends=('elfutils' 'nss' 'python2')
+source=(http://www.trueconf.ru/download/beta/trueconf-client-${pkgver}-amd64.pkg.tar.xz)
+sha1sums=('350e2fa3ba24d99eceb1544421f4998fa2a8b52b')
+install=.INSTALL
+
+
+build() {
+ cp ${srcdir}/.INSTALL ../
+}
+
+package() {
+ cp -r ${srcdir}/opt ${pkgdir}
+ cp -r ${srcdir}/usr ${pkgdir}
+}
+
+# vim:set ts=2 sw=2 et: