summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Führicht2021-07-26 16:34:51 +0200
committerRobert Führicht2021-07-26 16:35:51 +0200
commitcb8f0a58c01e9ece9270423ab9de499f96c93471 (patch)
treec1a550a85b6c57b61e507971011948ee90e41096
parentcbeb3d89c101f79d5186e26e3f32b04266736bf0 (diff)
downloadaur-cb8f0a58c01e9ece9270423ab9de499f96c93471.tar.gz
Initial commit
-rw-r--r--.SRCINFO23
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD72
3 files changed, 62 insertions, 37 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a0c10dad141b..565a60ae633e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,16 @@
-pkgbase = empty
- pkgdesc = Run applications under pseudo-terminal sessions
- pkgver = 0.6.20b
+pkgbase = pdkgo-git
+ pkgdesc = Produce content for any Puppet Product
+ pkgver = 0.2.0.r19.b774328
pkgrel = 1
- url = http://empty.sourceforge.net/
- arch = i686
+ url = https://github.com/puppetlabs/pdkgo
arch = x86_64
- license = custom
- source = http://downloads.sourceforge.net/sourceforge/empty/empty-0.6.20b.tgz
- sha256sums = 7e6636e400856984c4405ce7bd0843aaa3329fa3efd20c58df8400a9eaa35f09
-
-pkgname = empty
+ license = Apache
+ makedepends = git
+ makedepends = go-pie
+ depends = glibc
+ provides = pdkgo
+ conflicts = pdkgo
+ source = pdkgo::git+https://github.com/puppetlabs/pdkgo
+ sha512sums = SKIP
+pkgname = pdkgo-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..a6e3ef05779e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.pkg.tar.*
+pdkgo/
+pkg/
+src/
diff --git a/PKGBUILD b/PKGBUILD
index 1eecc72b2f35..34824ebd5cf2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,34 +1,52 @@
-# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
-# Contributor: Jeremy Cowgar <jeremy@cowgar.com>
+# Maintainer: fuero <fuerob@gmail.com>
-pkgname=empty
-pkgver=0.6.20b
+pkgname=pdkgo-git
+pkgver=0.2.0.r19.b774328
pkgrel=1
-pkgdesc="Run applications under pseudo-terminal sessions"
-arch=('i686' 'x86_64')
-url="http://empty.sourceforge.net/"
-license=('custom')
-source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tgz)
-sha256sums=('7e6636e400856984c4405ce7bd0843aaa3329fa3efd20c58df8400a9eaa35f09')
-
-build() {
- cd "${srcdir}"/$pkgname-$pkgver
-
-# man pages to the right location
- sed -e 's|/man/man1|/share/man/man1|g' -i Makefile
-
- make
+pkgdesc='Produce content for any Puppet Product'
+arch=('x86_64')
+_repo_prefix='github.com/puppetlabs'
+_repo_name="${pkgname%-git}"
+_bin_name="pct"
+url="https://${_repo_prefix}/${_repo_name}"
+source=("${_repo_name}::git+https://${_repo_prefix}/${_repo_name}")
+license=('Apache')
+depends=('glibc')
+makedepends=('git' 'go-pie')
+conflicts=('pdkgo')
+provides=('pdkgo')
+sha512sums=('SKIP')
+
+pkgver() {
+ cd "${srcdir}/${_repo_name}"
+ (
+ set -o pipefail
+ git describe --long --tags 2> /dev/null | sed "s/^[A-Za-z\.\-]*//;s/\([^-]*-\)g/r\1/;s/-/./g" ||
+ printf "r%s.%s\n" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
}
-package() {
- cd "${srcdir}"/$pkgname-$pkgver
-
- make PREFIX="${pkgdir}"/usr install
+#prepare () {
+# mkdir -p "${srcdir}/src/${_repo_prefix}"
+# ln -snf "${srcdir}/${_repo_name}" "${srcdir}/src/${_repo_prefix}/${_repo_name}"
+#}
+
+build () {
+ cd "${srcdir}/${_repo_name}"
+ export GOPATH="${srcdir}"
+ go get -v ./...
+ go fmt ./...
+ git clone -b main --depth 1 --single-branch https://github.com/puppetlabs/baker-round "templates"
+ go build -x -i -v -ldflags "-extldflags '${LDFLAGS}' -X main.commit=$(git rev-parse --short HEAD) -X main.date=$(date -u +%Y%m%d.%H%M%S) -X main.version=$(git describe --always --tags --abbrev=0).$(git rev-parse --short HEAD)" -o "${_repo_name}.bin"
+}
-# license file
- install -Dm644 COPYRIGHT "${pkgdir}"/usr/share/licenses/$pkgname/COPYRIGHT
+package () {
+ cd "${srcdir}/${_repo_name}"
+ install -Dm755 "${_repo_name}.bin" "${pkgdir}/usr/bin/${_bin_name}"
+ install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-# docs
- install -Dm644 CHANGELOG "${pkgdir}"/usr/share/doc/$pkgname/CHANGELOG
- install -Dm644 README "${pkgdir}"/usr/share/doc/$pkgname/README
+ for _file in *.md
+ do
+ install -Dm644 "${_file}" "${pkgdir}/usr/share/doc/${pkgname}/$(basename ${_file})"
+ done
}