summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgraysky2017-09-14 17:47:43 -0400
committergraysky2017-09-14 17:47:43 -0400
commit45519618f4b3dc386e0d0f850fca83c4acf78e49 (patch)
tree4e3a6a580250bd891103686c5d100da106fa7eb0
downloadaur-45519618f4b3dc386e0d0f850fca83c4acf78e49.tar.gz
initial release
-rw-r--r--.SRCINFO31
-rw-r--r--PKGBUILD73
-rw-r--r--config.in9
-rw-r--r--service.in12
4 files changed, 125 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..42b12f12923
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,31 @@
+pkgbase = distccd-alarm
+ pkgver = 7.1.1
+ pkgrel = 2
+ url = http://archlinuxarm.org/developers/distcc-cross-compiling
+ arch = x86_64
+ license = GPL
+ depends = distcc
+ options = libtool
+ options = emptydirs
+ options = !strip
+ source = x-tools-7.1.1-2.tar.xz::https://archlinuxarm.org/builder/xtools/7.1.1-2/x-tools.tar.xz
+ source = x-tools6h-7.1.1-2.tar.xz::https://archlinuxarm.org/builder/xtools/7.1.1-2/x-tools6h.tar.xz
+ source = x-tools7h-7.1.1-2.tar.xz::https://archlinuxarm.org/builder/xtools/7.1.1-2/x-tools7h.tar.xz
+ source = x-tools8-7.1.1-2.tar.xz::https://archlinuxarm.org/builder/xtools/7.1.1-2/x-tools8.tar.xz
+ source = config.in
+ source = service.in
+ md5sums = 1ade1ced844961a39e1e539fb04c1d65
+ md5sums = bfe68188dae1512690d9981ff0ee7460
+ md5sums = 2ae08024566bd62249d4a83ee8d90124
+ md5sums = d1a7cb480f1090ce6a5a370cd5cec4cd
+ md5sums = e68374ceee62f521a31445e986fc5714
+ md5sums = 7e664f8ce386f467f1a7381c9ac3c06f
+
+pkgname = distccd-alarm-armv5
+
+pkgname = distccd-alarm-armv6h
+
+pkgname = distccd-alarm-armv7h
+
+pkgname = distccd-alarm-armv8
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..e45d33b43b1
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,73 @@
+# Maintainer: graysky <graysky AT archlinux DOT us>
+# Contributer: Jason Plum <jplum@archlinuxarm.org>
+# Contributer: Kevin Mihelich <kevin@archlinuxarm.org>
+
+PKGEXT='.pkg.tar'
+_subarchs=(armv5 armv6h armv7h armv8)
+pkgbase='distccd-alarm'
+pkgname=("${_subarchs[@]/#/$pkgbase-}")
+pkgver=7.1.1
+pkgrel=2
+arch=('x86_64')
+license=('GPL' )
+url="http://archlinuxarm.org/developers/distcc-cross-compiling"
+depends=('distcc')
+options=('libtool' 'emptydirs' '!strip')
+_URL="https://archlinuxarm.org/builder/xtools/$pkgver-$pkgrel"
+source=("x-tools-$pkgver-$pkgrel.tar.xz::$_URL/x-tools.tar.xz"
+"x-tools6h-$pkgver-$pkgrel.tar.xz::$_URL/x-tools6h.tar.xz"
+"x-tools7h-$pkgver-$pkgrel.tar.xz::$_URL/x-tools7h.tar.xz"
+"x-tools8-$pkgver-$pkgrel.tar.xz::$_URL/x-tools8.tar.xz"
+'config.in' 'service.in')
+md5sums=('1ade1ced844961a39e1e539fb04c1d65'
+'bfe68188dae1512690d9981ff0ee7460'
+'2ae08024566bd62249d4a83ee8d90124'
+'d1a7cb480f1090ce6a5a370cd5cec4cd'
+'e68374ceee62f521a31445e986fc5714'
+'7e664f8ce386f467f1a7381c9ac3c06f')
+
+build() {
+ # setup config and services
+ _path=('' '6h' '7h' '8')
+ _name=('arm-unknown-linux-gnueabi' 'arm-unknown-linux-gnueabihf'
+ 'arm-unknown-linux-gnueabihf' 'aarch64-unknown-linux-gnueabi')
+ _port=(2 3 4 5)
+
+ for i in 0 1 2 3; do
+ # make service units
+ sed "s/@VERS@/${_subarchs[$i]}/" <service.in >"distccd-${_subarchs[$i]}.service"
+
+ # make configs
+ sed -e "s/@VERS@/${_path[$i]}/" \
+ -e "s/@PATH@/${_name[$i]}/" \
+ -e "s/@LOG@/${_subarchs[$i]}/" \
+ -e "s/@PORT@/${_port[$i]}/" \
+ <config.in >"distccd-${_subarchs[$i]}.conf"
+ done
+}
+
+_package_subarch() {
+ # backup configs
+ backup=("etc/conf.d/distccd-$1")
+ pkgdesc="A toolchain for Arch ARM $1 builds via distcc"
+ # install symlink to distccd
+ install -d "${pkgdir}/usr/bin"
+ ln -sf /usr/bin/distccd "${pkgdir}/usr/bin/distccd-$1"
+ # copy in toolchain
+ install -d "${pkgdir}/opt/x-tools-$1"
+ cp -ar "${srcdir}/$2" "${pkgdir}/opt/x-tools-$1"
+ # install services
+ install -Dm0644 "${srcdir}/distccd-$1.service" \
+ "${pkgdir}/usr/lib/systemd/system/distccd-$1.service"
+ # install config
+ install -Dm0644 "${srcdir}/distccd-$1.conf" \
+ "${pkgdir}/etc/conf.d/distccd-$1"
+}
+
+for i in "${!_subarchs[@]}"; do
+ _xtoolsdir="${source[i]##*/}"
+ _xtoolsdir="${_xtoolsdir%%.*}"
+ eval 'package_distccd-alarm-'${_subarchs[i]}'() {
+ _package_subarch '${_subarchs[i]}' '${_xtoolsdir}'
+}'
+done
diff --git a/config.in b/config.in
new file mode 100644
index 00000000000..5a1ea4bd8e7
--- /dev/null
+++ b/config.in
@@ -0,0 +1,9 @@
+#
+# Parameters to be passed to distccd
+#
+# You must explicitly add IPs (or subnets) that are allowed to connect,
+# using the --allow switch. See the distccd manpage for more info.
+#
+
+PATH=/opt/x-tools@VERS@/@PATH@/bin:$PATH
+DISTCC_ARGS="--allow 127.0.0.1 --log-file /tmp/distccd-@LOG@.log --port 363@PORT@"
diff --git a/service.in b/service.in
new file mode 100644
index 00000000000..5507cf3ef8d
--- /dev/null
+++ b/service.in
@@ -0,0 +1,12 @@
+[Unit]
+Description=A distributed C/C++ compiler
+Documentation=man:distccd(1)
+After=network.target
+
+[Service]
+User=nobody
+EnvironmentFile=/etc/conf.d/distccd-@VERS@
+ExecStart=/usr/bin/distccd --no-detach --daemon $DISTCC_ARGS
+
+[Install]
+WantedBy=multi-user.target