Skip to content

Instantly share code, notes, and snippets.

@kungfoo
Created February 4, 2013 11:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kungfoo/4706143 to your computer and use it in GitHub Desktop.
Save kungfoo/4706143 to your computer and use it in GitHub Desktop.
Hotot 0.9.8.10 PKGBUILD without KDE libraries
# Maintainer: speps <speps at aur dot archlinux dot org>
pkgbase=hotot
pkgname=hotot
true && pkgname=('hotot-data' 'hotot-gtk2' 'hotot-gtk3')
pkgver=0.9.8.10
pkgrel=2
pkgdesc="A lightweight & open source microblogging software (twitter identi.ca)."
arch=('any')
url="http://www.hotot.org/"
license=('LGPL3')
makedepends=('cmake' 'intltool' 'python2')
install="hotot.install"
source=("https://github.com/lyricat/Hotot/tarball/$pkgver")
md5sums=('1bd967a811d2898e4b8392ad8b46108d')
build() {
cd ${srcdir}/lyricat-Hotot-*
for _pkg in ${pkgname[@]/hotot-}; do
msg2 "Building $_pkg .."
[ -d bld-$_pkg ] || mkdir bld-$_pkg && pushd bld-$_pkg
cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
-DWITH_GTK=`[[ $_pkg = gtk[23] ]] && echo ON || echo OFF` \
-DWITH_GIR=`[[ $_pkg = gtk3 ]] && echo ON || echo OFF` \
-DWITH_QT=`[[ $_pkg =~ (qt|kde) ]] && echo ON || echo OFF` \
-DWITH_KDE=`[[ $_pkg = kde ]] && echo ON || echo OFF` \
-DWITH_CHROME=OFF \
-DPYTHON_EXECUTABLE=/usr/bin/python2
make && popd
done
}
package_hotot-data() {
true && depends=('hicolor-icon-theme')
cd ${srcdir}/lyricat-Hotot-*/bld-data
make DESTDIR="$pkgdir/" install
# remove google analytics tracking code (tnx to ianux)
find "$pkgdir" -name hotot.js -exec \
sed -i '/\/\/ 7. run track code/,+12d' {} \;
# rm unneded
rm -rf "$pkgdir/usr/share/applications"
}
package_hotot-qt() {
true && arch=('i686' 'x86_64')
true && depends=('hotot-data' 'qtwebkit')
cd ${srcdir}/lyricat-Hotot-*/bld-qt
# bin
install -Dm755 qt/hotot-qt \
"$pkgdir/usr/bin/hotot-qt"
# desktop file
install -Dm644 misc/hotot-qt.desktop \
"$pkgdir/usr/share/applications/hotot-qt.desktop"
}
package_hotot-kde() {
true && arch=('i686' 'x86_64')
true && depends=('hotot-data' 'kdebase-runtime')
cd ${srcdir}/lyricat-Hotot-*/bld-kde
# bin
install -Dm755 qt/hotot-qt \
"$pkgdir/usr/bin/hotot-kde"
# desktop file
install -Dm644 misc/hotot-qt.desktop \
"$pkgdir/usr/share/applications/hotot-kde.desktop"
sed -i "s/qt/kde/;s/Qt/Kde/" \
"$pkgdir/usr/share/applications/hotot-kde.desktop"
}
package_hotot-gtk2() {
true && depends=('hotot-data' 'pywebkitgtk' 'python2-notify' 'python2-pycurl'
'python2-keybinder2' 'python2-dbus' 'desktop-file-utils')
true && optdepends=('libappindicator: unity menubar integration')
cd ${srcdir}/lyricat-Hotot-*/bld-gtk2
# bin
install -Dm755 scripts/hotot \
"$pkgdir/usr/bin/hotot"
# libs
install -d "$pkgdir/usr/lib/python2.7/site-packages/hotot"
install -Dm644 hotot/*.py* \
"$pkgdir/usr/lib/python2.7/site-packages/hotot"
# desktop file
install -Dm644 misc/hotot.desktop \
"$pkgdir/usr/share/applications/hotot.desktop"
}
package_hotot-gtk3() {
true && depends=('hotot-data' 'python2-gobject' 'python2-dbus'
'python2-pycurl' 'webkitgtk3' 'desktop-file-utils')
true && optdepends=('libappindicator3: unity menubar integration')
cd ${srcdir}/lyricat-Hotot-*/bld-gtk3
# bin
install -Dm755 scripts/hotot \
"$pkgdir/usr/bin/hotot-gtk3"
sed -i "s/hotot/&_gir/" "$pkgdir/usr/bin/hotot-gtk3"
# libs
install -d "$pkgdir/usr/lib/python2.7/site-packages/hotot_gir"
install -Dm644 hotot-gir/*.py* \
"$pkgdir/usr/lib/python2.7/site-packages/hotot_gir"
# desktop file
install -Dm644 misc/hotot.desktop \
"$pkgdir/usr/share/applications/hotot-gtk3.desktop"
sed -i "/Exec/s/hotot/&-gtk3/;/^Name/s/$/ Gtk3/;s/2/3/" \
"$pkgdir/usr/share/applications/hotot-gtk3.desktop"
}
# vim:set ts=2 sw=2 et:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment