summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 341a42414f35822ac9b6a3451b395d726f99d3c4 (plain)
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
# Maintainer: Luca Weiss <luca (at) z3ntu (dot) xyz>
# Contributor: Vaporeon <vaporeon@vaporeon.io>

pkgname=kde1-kdelibs-git
pkgver=1.1.2r3049.cc31c174
pkgrel=1
pkgdesc="Historical copy of the libraries module of KDE 1, adapted to compile on modern systems (circa. 2016)"
arch=('i686' 'x86_64')
url="https://invent.kde.org/historical/kde1-kdelibs"
license=("GPL2" "LGPL2")
groups=('kde1')
depends=('qt1' 'libpng' 'libjpeg-turbo' 'libtiff')
makedepends=('cmake' 'git')
provides=('kde1-kdelibs')
conflicts=('kde1-kdelibs')
source=("git+https://invent.kde.org/historical/kde1-kdelibs.git")
md5sums=('SKIP')

pkgver() {
  cd kde1-kdelibs
  printf "1.1.2r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  if [[ -d build ]]; then
    rm -rf build && mkdir build
  else
    mkdir build
  fi
}

build() {
  cd build
  cmake ../kde1-kdelibs \
    -DCMAKE_INSTALL_PREFIX='/usr'
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir/" install

  cd ../kde1-kdelibs
  install -Dm644 COPYING \
    "$pkgdir"/usr/share/licenses/$pkgname/COPYING
  install -Dm644 COPYING.LIB \
    "$pkgdir"/usr/share/licenses/$pkgname/COPYING.LIB
}