Anonim / 4 months, 3 weeks ago | Download | Plaintext | Odpowiedz |

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# Maintainer: Yichao Yu <yyc1992 at gmail dot com>
# Contributor: speps <speps at aur dot archlinux dot org>

pkgbase=hotot
pkgname=('hotot-data-git' 'hotot-gtk2-git' 'hotot-gtk3-git'
  'hotot-qt-git' 'hotot-kde-git' 'hotot-qt5-git')
pkgver=20130124
pkgrel=1
pkgdesc="A lightweight & open source microblogging software (twitter identi.ca)."
arch=('any')
url="http://www.hotot.org/"
license=('LGPL3')
makedepends=('git' 'cmake' 'intltool' 'python2' 'qt' 'qtwebkit' 'qt5')
makedepends+=('kdebase-runtime')
install="hotot-git.install"

_gitname="hotot"
_gitroot="https://github.com/lyricat/Hotot.git"
_gitbranch=master

build() {
  cd "$srcdir"

  if [ -d "$srcdir/$_gitname/.git" ]; then
    cd "$_gitname"
    msg "Reset current branch"
    git reset --hard HEAD
    msg "Fetching branch $_gitbranch from $_gitroot..."
    git fetch --force --update-head-ok \
      "$_gitroot" "$_gitbranch:$_gitbranch"
    msg "Checking out branch $_gitbranch..."
    git checkout "$_gitbranch" --
    git reset --hard "$_gitbranch" --
    msg "The local files are updated."
  else
    msg "Cloning branch $_gitbranch from $_gitroot to $_gitname..."
    git clone --single-branch --branch "$_gitbranch" \
      "$_gitroot" "$_gitname"
    cd "$_gitname"
  fi
  msg "GIT checkout done or server timeout"

  msg "Creating make environment..."
  git clean -fdx
  mkdir -p build
  cd build
  cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo \
    -DWITH_GTK2=On -DWITH_GTK3=On -DWITH_CHROME=Off \
    -DPYTHON_EXECUTABLE=/usr/bin/python2 -DWITH_KDE_QT=On -DWITH_QT5=On
  make
  make install DESTDIR="${PWD}/pkg"
}

package_hotot-data-git() {
  depends=('hicolor-icon-theme')
  provides=("${pkgname/-git}")
  conflicts=("${pkgname/-git}")
  cd "$srcdir/$_gitname/build/pkg/usr/share"

  install -d "$pkgdir/usr/share"
  for dir in *; do
    # desktop files
    [ "$dir" = applications ] && continue
    # kde icon
    [ "$dir" = apps ] && continue
    mv "$dir" "$pkgdir/usr/share"
  done
}

package_hotot-qt-git() {
  arch=('i686' 'x86_64')
  depends=('hotot-data-git' 'qtwebkit')
  provides=("${pkgname/-git}")
  conflicts=("${pkgname/-git}")
  cd "$srcdir/$_gitname/build/pkg"

  install -Dm755 usr/bin/hotot-qt "$pkgdir/usr/bin/hotot-qt"
  install -Dm644 usr/share/applications/hotot-qt.desktop \
    "$pkgdir/usr/share/applications/hotot-qt.desktop"
}

package_hotot-qt5-git() {
  arch=('i686' 'x86_64')
  depends=('hotot-data-git' 'qt5')
  provides=("${pkgname/-git}")
  conflicts=("${pkgname/-git}")
  cd "$srcdir/$_gitname/build/pkg"

  install -Dm755 usr/bin/hotot-qt5 "$pkgdir/usr/bin/hotot-qt5"
  install -Dm644 usr/share/applications/hotot-qt5.desktop \
    "$pkgdir/usr/share/applications/hotot-qt5.desktop"
}

package_hotot-kde-git() {
  arch=('i686' 'x86_64')
  depends=('hotot-data-git' 'kdebase-runtime')
  provides=("${pkgname/-git}")
  conflicts=("${pkgname/-git}")
  cd "$srcdir/$_gitname/build/pkg"

  install -Dm755 usr/bin/hotot-kde "$pkgdir/usr/bin/hotot-kde"
  install -Dm644 usr/share/applications/hotot-kde.desktop \
    "$pkgdir/usr/share/applications/hotot-kde.desktop"
  mv usr/share/apps "$pkgdir/usr/share/"
}

package_hotot-gtk2-git() {
  depends=('hotot-data-git' 'pywebkitgtk' 'python2-notify'
    'python-keybinder' 'dbus-python' 'desktop-file-utils')
  optdepends=('libappindicator: unity menubar integration')
  provides=("${pkgname/-git}" 'hotot')
  conflicts=("${pkgname/-git}" 'hotot')
  cd "$srcdir/$_gitname/build/pkg"

  install -Dm755 usr/bin/hotot-gtk2 "$pkgdir/usr/bin/hotot-gtk2"
  install -Dm644 usr/share/applications/hotot-gtk2.desktop \
    "$pkgdir/usr/share/applications/hotot-gtk2.desktop"
  install -d "$pkgdir/usr/lib/python2.7/site-packages"
  mv usr/lib/python2.7/site-packages/hotot_gtk2 \
    "$pkgdir/usr/lib/python2.7/site-packages/"
}

package_hotot-gtk3-git() {
  depends=('hotot-data-git' 'python2-gobject' 'dbus-python'
    'libwebkit3' 'desktop-file-utils')
  optdepends=('libappindicator: unity menubar integration')
  provides=("${pkgname/-git}")
  conflicts=("${pkgname/-git}")
  cd "$srcdir/$_gitname/build/pkg"

  install -Dm755 usr/bin/hotot-gtk3 "$pkgdir/usr/bin/hotot-gtk3"
  install -Dm644 usr/share/applications/hotot-gtk3.desktop \
    "$pkgdir/usr/share/applications/hotot-gtk3.desktop"
  install -d "$pkgdir/usr/lib/python2.7/site-packages"
  mv usr/lib/python2.7/site-packages/hotot_gtk3 \
    "$pkgdir/usr/lib/python2.7/site-packages/"
}