summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 53b28f785d0904466b71152d74d884c6a7e25eaf (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
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Daniel Seymour <dannyseeless@gmail.com>

pkgname=qnap-qdk-git
pkgver=2.3.10.r92.4903650
pkgrel=1
pkgdesc='QNAP Development Kit'
arch=(x86_64)
url=https://github.com/qnap-dev/QDK
license=(GPL)
depends=(rsync)
makedepends=(git)
optdepends=(
  'gpg: Support for GPG signing'
  'p7zip: Support for 7z compression'
)
provides=(qnap-qdk)
conflicts=(qnap-qdk)
source=(git+https://github.com/qnap-dev/QDK.git)
sha256sums=(SKIP)

pkgver() {
  cd QDK

  source shared/qdk.conf
  echo "${QDK_VERSION}.r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}

prepare() {
 sed -i 's/\/etc\/config/\/etc/g; s/\/usr\/local/\/usr/g' QDK/shared/bin/qbuild
 sed -i 's/^QDK_PATH_P=.*/QDK_PATH_P=\/opt/' QDK/shared/qdk.conf
}

build(){
  make -C QDK/src
}

package() {
  install -dm 755 "${pkgdir}"/{usr/bin,opt/QDK}
  cp -dr --no-preserve='ownership' QDK/shared/{bin,doc,scripts,template} "${pkgdir}"/opt/QDK/
  install -Dm 644 QDK/shared/qdk.conf -t "${pkgdir}"/etc/
  ln -s /opt/QDK/bin/qbuild "${pkgdir}"/usr/bin/
  ln -s /opt/QDK/bin/qpkg_encrypt "${pkgdir}"/usr/bin/
}

# vim: ts=2 sw=2 et: