Browse Source

Added some small PKGBUILD files for Arch Linux building

Getty Ritter 9 years ago
parent
commit
e7c34ba9db
5 changed files with 84 additions and 0 deletions
  1. 4 0
      escaped-string/Makefile
  2. 33 0
      escaped-string/PKGBUILD
  3. 15 0
      escaped-string/escstring.1
  4. 4 0
      expseq/Makefile
  5. 28 0
      expseq/PKGBUILD

+ 4 - 0
escaped-string/Makefile

@@ -1,10 +1,14 @@
 CC      = musl-gcc
 LDFLAGS = -lm
+prefix  = /usr/local
 
 all: escstring
 
 escstring:
 	$(CC) $(LDFLAGS) escstring.c -o $@
 
+install:
+	install -m 0755 escstring $(prefix)/bin
+
 clean:
 	rm -f escstring escstring.o

+ 33 - 0
escaped-string/PKGBUILD

@@ -0,0 +1,33 @@
+pkgname=whatchamacallit-escstring
+pkgver=0.0.1
+pkgrel=1
+pkgdesc="JSON-like string escaping."
+url="http://www.gdritter.com"
+arch=('x86_64' 'i686')
+license=('WTFPL')
+depends=('musl')
+optdepends=()
+makedepends=()
+conflicts=()
+replaces=()
+backup=()
+install=''
+source=('escstring.c'
+	    'escstring.1'
+        'Makefile')
+md5sums=('5d1bb6c729091c19bab98189d26a4772'
+	'a8031df89e9cbc0c565046f60a359837'
+	'e35cfdabe4de2c98895840f559a70bda')
+
+
+build() {
+  make
+}
+
+package() {
+  mkdir -p ${pkgdir}/usr/local/bin
+  mkdir -p ${pkgdir}/usr/local/man/man8
+  make prefix="${pkgdir}/usr/local" install
+  install -g 0 -o 0 -m 0644 escstring.1 ${pkgdir}/usr/local/man/man8/
+  gzip ${pkgdir}/usr/local/man/man8/escstring.1
+}

+ 15 - 0
escaped-string/escstring.1

@@ -0,0 +1,15 @@
+.\" Manpage for escstring.
+.TH man 8 "05 Feb 2015" "1.0" "escstring man page"
+.SH NAME
+escstring \- escape a string on stdin
+.SH SYNOPSIS
+nuseradd
+.SH DESCRIPTION
+escstring takes input on stdin and produces a JSON-compatible string on
+stdout.
+.SH OPTIONS
+escstring takes no options.
+.SH BUGS
+No known bugs.
+.SH AUTHOR
+Getty Ritter (getty.ritter@gmail.com)

+ 4 - 0
expseq/Makefile

@@ -1,10 +1,14 @@
 CC      = musl-gcc
 LDFLAGS = -lm
+prefix  = /usr/local
 
 all: expseq
 
 expseq:
 	$(CC) $(LDFLAGS) expseq.c -o $@
 
+install:
+	install -m 0755 expseq $(prefix)/bin
+
 clean:
 	rm -f expseq expseq.o

+ 28 - 0
expseq/PKGBUILD

@@ -0,0 +1,28 @@
+pkgname=whatchamacallit-expseq
+pkgver=0.0.1
+pkgrel=1
+pkgdesc="Like seq but for exponentially increasing numbers."
+url="http://www.gdritter.com"
+arch=('x86_64' 'i686')
+license=('WTFPL')
+depends=('musl')
+optdepends=()
+makedepends=()
+conflicts=()
+replaces=()
+backup=()
+install=''
+source=('expseq.c'
+        'Makefile')
+md5sums=('7a9b9ee6b46525fffc5557efb28fd639'
+	'4f37c062e2b0057d6f454bfe61cc04a7')
+
+
+build() {
+  make
+}
+
+package() {
+  mkdir -p ${pkgdir}/usr/local/bin
+  make prefix="${pkgdir}/usr/local" install
+}