From 4a10c3c6072cb6c75330b07b1903ef84c087f008 Mon Sep 17 00:00:00 2001 From: emmett1 Date: Sun, 10 Nov 2019 23:29:11 +0800 Subject: [PATCH] add httpup port --- ports/core/REPO | 3 +++ ports/core/httpup/Pkgfile | 20 ++++++++++++++++++++ ports/core/httpup/httpup | 27 +++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100755 ports/core/httpup/Pkgfile create mode 100755 ports/core/httpup/httpup diff --git a/ports/core/REPO b/ports/core/REPO index 9a896c6..0c719b7 100644 --- a/ports/core/REPO +++ b/ports/core/REPO @@ -5,6 +5,7 @@ d:intltool d:shadow d:mpc d:kmod +d:httpup d:gcc d:xz d:man-db @@ -108,6 +109,8 @@ f:5f582ebf3914ae0277c5738cd2917f75:shadow/Pkgfile f:babefc326b69e5c23dec019e1f664c3b:shadow/post-install f:38fd4e9168d49ab7e0bbd1144f4f231a:mpc/Pkgfile f:da2528d85a28de6a07281d635b142c58:kmod/Pkgfile +f:faa600a1b0349fe78b0eb463cab444df:httpup/httpup +f:9b636f89d1520d4036b832a430bc6d33:httpup/Pkgfile f:5f96bb0e73567985ffc919f7c2e7213f:gcc/Pkgfile f:638d339a29abe3cce8c9c920a36d5125:xz/Pkgfile f:f5625811c2c785ba538a7ed60122039e:man-db/Pkgfile diff --git a/ports/core/httpup/Pkgfile b/ports/core/httpup/Pkgfile new file mode 100755 index 0000000..cbc8bae --- /dev/null +++ b/ports/core/httpup/Pkgfile @@ -0,0 +1,20 @@ +# Description: One way sync over http +# URL: https://github.com/winkj/httpup +# Maintainer: Emmett1, emmett1 dot 2miligrams at gmail dot com +# Depends on: curl + +name=httpup +version=0.5.0 +release=1 +source=(https://crux.nu/files/$name-$version.tar.xz + httpup) + +build() { + cd $name-$version + + make + make DESTDIR=$PKG prefix=/usr mandir=/usr/share/man install + + # driver + install -Dm755 $SRC/httpup $PKG/etc/ports/drivers/httpup +} diff --git a/ports/core/httpup/httpup b/ports/core/httpup/httpup new file mode 100755 index 0000000..5c8db84 --- /dev/null +++ b/ports/core/httpup/httpup @@ -0,0 +1,27 @@ +#!/bin/sh +# +# /etc/ports/drivers/httpup: httpup driver script for ports(8) +# + +if [ $# -ne 1 ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +. $1 + +if [ -z "$ROOT_DIR" ]; then + echo "ROOT_DIR not set in '$1'" >&2 + exit 2 +fi +if [ -z "$URL" ]; then + echo "URL not set in '$1'" >&2 + exit 2 +fi + +for REPO in $URL; do + PORT=`echo $REPO | sed -n '/#.*$/s|^.*#||p'` + httpup sync $REPO $ROOT_DIR/$PORT +done + +# End of file.