summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6ba68520e3ce29478f891f63e82738e49cf058e6 (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
# Contributor: Bill Zhechuan Chen <chen.bill.bill(at)gmail.com>
# Contributor: taotieren <admin@taotieren.com>

pkgname=gstcisp
_pkgname=gSTCISP
pkgver=1.0
pkgrel=2
pkgdesc="gSTC-ISP is used to program the STC89C52RC by serial port in Linux"
arch=(x86_64 i686)
url="http://gstcisp.sourceforge.net/"
license=('GPLv3')
source=(http://sourceforge.net/projects/gstcisp/files/gSTC-ISP_v"$pkgver".tar.gz)
depends=("vte-legacy" "gtk2")
optdepends=("hex2bin: Converts Motorola and Intel hex files to binary."
            "hex2bin-bin: Converts Motorola and Intel hex files to binary.")
makedepends=("gcc")
sha256sums=('67344a08a64cc2b0fdcec5cf50d57d2f4755928fa90828be5dc4d1ec06d8388a')

build() {
  cd "${srcdir}/gSTC-ISP/src"
  cp  main.c main.c.bak
  sed -i 's/<vte\//<vte-0.0\/vte\//g' main.c
  sed -i 's/<gtk\//<gtk-2.0\/gtk\//g' main.c

  cd "${srcdir}/gSTC-ISP/"
  ./configure --prefix=/usr
  make
}

package() {
  install -Dm 755 "${srcdir}/gSTC-ISP/src/${_pkgname}" "${pkgdir}/usr/bin/${pkgname}"
  install -Dm 644 "${srcdir}/gSTC-ISP/pixmaps/${_pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
  install -Dm644 /dev/stdin "${pkgdir}/usr/share/applications/${pkgname}.desktop" << EOF
[Desktop Entry]
Version=${pkgver}
Name=${pkgname}
Comment=${pkgname}
Comment[zh_CN]="STC 串口下载工具"
GenericName=${pkgname}
GenericName[zh_CN]="STC 串口下载工具"
Exec=${pkgname}
Icon=${pkgname}.png
Terminal=false
StartupNotify=true
Type=Application
Categories=Development
EOF
}