summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 02884c002afee904752b1112306faa8e910c0eab (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
# Maintainer: Felix Yan <felixonmars@gmail.com>

pkgbase=dnsmasq-china-list-git
pkgname=(dnsmasq-china-list-git smartdns-china-list-git)
pkgver=0.96984.ab47aca5b5
pkgrel=1
pkgdesc="Configuration for hot China domains to accelerate via Dnsmasq"
arch=('any')
url="https://github.com/felixonmars/dnsmasq-china-list"
license=('WTFPL')
makedepends=('git')
source=("git+https://github.com/felixonmars/dnsmasq-china-list.git")
md5sums=('SKIP')

pkgver() {
  cd dnsmasq-china-list
  echo 0.$(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd dnsmasq-china-list
  make smartdns SERVER=china
}

package_dnsmasq-china-list-git() {
  pkgdesc="Configuration for hot China domains to accelerate via Dnsmasq"
  depends=('dnsmasq')

  install -Dm644 dnsmasq-china-list/accelerated-domains.china.conf "$pkgdir/etc/dnsmasq.d/accelerated-domains.china.conf"
  install -Dm644 dnsmasq-china-list/apple.china.conf "$pkgdir/etc/dnsmasq.d/apple.china.conf"
  install -Dm644 dnsmasq-china-list/google.china.conf "$pkgdir/etc/dnsmasq.d/google.china.conf"
  install -Dm644 dnsmasq-china-list/bogus-nxdomain.china.conf "$pkgdir/etc/dnsmasq.d/bogus-nxdomain.china.conf"
  install -Dm755 dnsmasq-china-list/dnsmasq-update-china-list "$pkgdir/usr/bin/dnsmasq-update-china-list"
}

package_smartdns-china-list-git() {
  pkgdesc="Configuration for hot China domains to accelerate via smartdns"
  depends=('smartdns')

  install -Dm644 dnsmasq-china-list/accelerated-domains.china.smartdns.conf "$pkgdir/etc/smartdns/accelerated-domains.china.smartdns.conf"
  install -Dm644 dnsmasq-china-list/apple.china.smartdns.conf "$pkgdir/etc/smartdns/apple.china.smartdns.conf"
  install -Dm644 dnsmasq-china-list/google.china.smartdns.conf "$pkgdir/etc/smartdns/google.china.smartdns.conf"
}

# vim:set ts=2 sw=2 et: