summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f860c396473d39981cab808e6dc148cb0e067c18 (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
49
50
51
52
53
54
55
56
57
# Maintainer: yjun <jerrysteve1104 at gmail dot com>

pkgname=phddns-bin
_pkgname=${pkgname%-bin}
pkgver=3.0.4
pkgrel=2
pkgdesc="Peanut shell is a dynamic DNS software, any place, any time, any lines, all can through fixed domain access to the remote host services"
arch=("armv7h")
url="https://hsk.oray.com/download/"
license=('custom')
options=('!strip')
install='.INSTALL'
source=('LICENSE::https://service.oray.com/question/1820.html')
source_armv7h=("http://download.oray.com/peanuthull/embed/${_pkgname}_${pkgver}_systemd.deb")

sha256sums=('SKIP')
sha256sums_armv7h=('d8fb134ecb61058e2e1a243755bfae656eaf1e0deaec6e8070a99d26c253265f')

package() {
  tar -xf data.tar.xz -C ${pkgdir}
  
  # systemd service
  cd ${pkgdir}
  for service in lib/systemd/system/*;
  do
    install -Dm644 $service usr/$service
  done
  rm -rf lib

  sed -i 's|/usr/orayapp/|/usr/bin/|g' usr/lib/systemd/system/*
  sed -i 's|/bin/rm|/usr/bin/rm -fr|g' usr/lib/systemd/system/*
  sed -i 's|/usr/orayapp|/usr/share/pgyvpn|g' usr/lib/systemd/system/phddns_sl.service 

  # binary
  install -Dm755 usr/sbin/phddns usr/bin/phddns
  install -Dm755 usr/orayapp/oraynewph usr/bin/oraynewph
  install -Dm755 usr/orayapp/oraysl usr/bin/oraysl
  rm -rf usr/orayapp/oray*
  rm -rf usr/sbin

  # scripts
  for scripts in usr/orayapp/*;
  do
    install -Dm755 $scripts usr/share/${_pkgname}/`basename $scripts`
  done
  rm -rf usr/orayapp

  # permisson fixed
  chmod 755 usr
  chown root:root usr

  # license
  install -Dm644 ${srcdir}/LICENSE usr/share/licenses/${pkgname}/LICENSE
}    


# vim: ts=2 sw=2 et: