summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Kočí2016-12-05 08:14:58 +0100
committerKarel Kočí2016-12-05 08:18:04 +0100
commit1a587a652d1fb54a9a115606905a76ca28f0840c (patch)
tree02f64cc3ea58c6da9940d0ece6fe8d08a4a53cf8
downloadaur-1a587a652d1fb54a9a115606905a76ca28f0840c.tar.gz
Create ttysterm package
Exeecutable it installs is named sterm, but because there is other project named sterm alreary in aur tty prefix is added to signal that this is terminal serial console, not graphical terminal.
-rw-r--r--.SRCINFO19
-rw-r--r--Fix-install-strip.patch36
-rw-r--r--PKGBUILD37
-rw-r--r--known-lockdev-bug.patch31
4 files changed, 123 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..db270348b8cf
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = ttysterm
+ pkgdesc = Simple serial terminal
+ pkgver = 20160921
+ pkgrel = 1
+ url = https://rtime.felk.cvut.cz/gitweb/sojka/sterm.git
+ arch = i686
+ arch = x86_64
+ license = GPL3
+ makedepends = git
+ depends = lockdev
+ source = ttysterm::git://rtime.felk.cvut.cz/sojka/sterm.git
+ source = Fix-install-strip.patch
+ source = known-lockdev-bug.patch
+ md5sums = SKIP
+ md5sums = e37c9b06de817993830efe9e277e740c
+ md5sums = 5df1b7923840120638c8a5ee39ed9118
+
+pkgname = ttysterm
+
diff --git a/Fix-install-strip.patch b/Fix-install-strip.patch
new file mode 100644
index 000000000000..ed7da3387e38
--- /dev/null
+++ b/Fix-install-strip.patch
@@ -0,0 +1,36 @@
+From da180154a36f14169ed80da310e378ae38516ba8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= <karel.koci@nic.cz>
+Date: Mon, 5 Dec 2016 07:41:40 +0100
+Subject: [PATCH 1/2] Fix install strip
+
+Strip can be used only on executables, adding it to all install
+commands causes error on some systems.
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 2cc363c..539342a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -2,7 +2,7 @@ CFLAGS = -O2 -Wall -g
+ LDLIBS = -llockdev
+
+ PREFIX ?= /usr/local
+-INSTALL ?= install -s
++INSTALL ?= install
+
+ all: sterm
+
+@@ -11,7 +11,7 @@ clean:
+
+ install: all
+ $(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
+- $(INSTALL) -m 755 sterm $(DESTDIR)$(PREFIX)/bin
++ $(INSTALL) -s -m 755 sterm $(DESTDIR)$(PREFIX)/bin
+ ifneq ($(NO_MAN),1)
+ $(INSTALL) -d $(DESTDIR)$(PREFIX)/share/man/man1
+ $(INSTALL) -m 644 sterm.man $(DESTDIR)$(PREFIX)/share/man/man1/sterm.1
+--
+2.10.2
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f6828f2c9dfd
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Karel Koči <cynerd@email.cz>
+pkgname=ttysterm
+pkgver=20160921
+pkgrel=1
+pkgdesc="Simple serial terminal"
+arch=('i686' 'x86_64')
+url="https://rtime.felk.cvut.cz/gitweb/sojka/sterm.git"
+license=('GPL3')
+depends=('lockdev')
+makedepends=('git')
+#changelog="debian/changelog"
+source=("$pkgname::git://rtime.felk.cvut.cz/sojka/sterm.git"
+ "Fix-install-strip.patch"
+ "known-lockdev-bug.patch")
+md5sums=('SKIP'
+ 'e37c9b06de817993830efe9e277e740c'
+ '5df1b7923840120638c8a5ee39ed9118')
+
+prepare() {
+ cd "$pkgname"
+ # Reset to specified version
+ git reset --hard $pkgver
+ # Fix install strip
+ patch -i $srcdir/Fix-install-strip.patch
+ # Document known bug with lockdev and Systemd
+ patch -i $srcdir/known-lockdev-bug.patch
+}
+
+build() {
+ cd "$pkgname"
+ make
+}
+
+package() {
+ cd "$pkgname"
+ make DESTDIR="$pkgdir/" PREFIX="/usr" install
+}
diff --git a/known-lockdev-bug.patch b/known-lockdev-bug.patch
new file mode 100644
index 000000000000..e4d7f2f357de
--- /dev/null
+++ b/known-lockdev-bug.patch
@@ -0,0 +1,31 @@
+From bf776a6a38a79f3518b7a5f8866d789aa377e467 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= <karel.koci@nic.cz>
+Date: Mon, 5 Dec 2016 07:54:27 +0100
+Subject: [PATCH 2/2] Add documentation about known bug with lockdev to man
+
+---
+ sterm.man | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/sterm.man b/sterm.man
+index 3a77f2a..07356f6 100644
+--- a/sterm.man
++++ b/sterm.man
+@@ -90,7 +90,13 @@ Any other input in the command mode raises an error and causes the
+ program to exit.
+
+ .SH BUGS
+-No known bugs.
++.I dev_lock(): No such file or directory
++.RS
++This is caused by known bug with lockdev and Systemd on Archlinux. After boot
++there is no directory '/var/lock/lockdev'. You have to create it after every boot
++with:
++ \fBsudo (mkdir /var/lock/lockdev; chown root:lock /var/lock/lockdev)\fR
++.RE
+
+ .SH SEE ALSO
+ .BR minicom (1),
+--
+2.10.2
+