summaryrefslogtreecommitdiff
path: root/PKGBUILD
blob: 3e439cdba797411755cd71a6f2725fe7417498ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Maintainer: jc_gargma <jc_gargma@iserlohn-fortress.net>
# Maintainer (AUR): Michael Wawrzyniak <arch ismyusernameat cmstactical nexttothecomma net>
# Contributor (AUR): chrisl echo archlinux@c2h0r1i2s4t5o6p7h8e9r-l3u4n1a.com|sed 's/[0-9]//g'
# Contributor (AUR): Mattias Andrée <`base64 -d`(bWFhbmRyZWUK)@member.fsf.org>

# # I maintain this because:
# AUR version lacks additional optimization and hardening flags
# AUR version lacks options=(!makeflags) to prevent build failures with high thread counts

pkgname=syncterm
pkgver=1.1
pkgrel=4
pkgdesc="A BBS terminal program, supporting ANSI music and IBM charset."
url="http://syncterm.bbsdev.net"
license=('GPL')
depends=('ncurses')
makedepends=('unzip')
optdepends=('hicolor-icon-theme: for GUI icon support'
            'sdl2: for SDL GUI support'
            'libx11: for X11 GUI support')
options=(!makeflags)
arch=('i686' 'x86_64')
source=("https://downloads.sourceforge.net/project/syncterm/syncterm/$pkgname-$pkgver/$pkgname-$pkgver-src.tgz"
        "cl-linux-yield.patch"
        "cl-makefile.patch"
        "st_crypt.patch")
md5sums=('f528a1fdbe87a69a52582582d99e4032'
         'c67ca676bddbbbbefa3fe20cd00ab7e7'
         '3471ec7748fc0a9d8be12424be7a8ff5'
         '69f59c1a5f71e44beb6e68644d497418')
b2sums=('91043a31374d73d29a447ab425007aad95ee7d22ded3ea4a518c1fa05958b5f20a4a83df9f575e9cb3962301cc31b55ab876e96addd617e045627d34e56fd922'
        '015e96bf2ba557cc2dba0b6c0ddc88af77a397ccd6757a56c58a7a6c2474d7cee7918fac243b4b3e0afb1bdc0521b643cbba6ad4d165545c04da6b03d8a93a31'
        'f8823c06267f63d649a5b3065358487f508aa605e02b4f0175f35c2f4932ab5efd3496b5756a6c4739a60a997e8620df68b2d216a2ea2c33bbb412abff41b587'
        'c816a89d35b498d9ee50286fc36371e6866289bd7c6ae4ce31e4dc9d54d4fa90a6cbc2972ea520f027111e8f8037ff3188d61ef65350208a4475afe920f55f87')

prepare() {
    cp "$srcdir/cl-linux-yield.patch" "$pkgname-$pkgver/3rdp/build/cl-linux-yield.patch"
    patch -Np1 -d "$pkgname-$pkgver" -i "${srcdir}/cl-makefile.patch"
    patch -Np1 -d "$pkgname-$pkgver" -i "${srcdir}/st_crypt.patch"
}

build() {
  cd "$srcdir/$pkgname-${pkgver}/src/syncterm"

  export MAKEFLAGS="-j1"
  export CFLAGS="$CFLAGS -O3 -fstack-protector-all -flto=auto -fPIE"
  export CXXFLAGS="$CXXFLAGS -O3 -fstack-protector-all -flto=auto -fPIE"
  export LDFLAGS="$LDFLAGS,-pie"

  make PREFIX="/usr" MANPREFIX="/usr/share" RELEASE=1
}

package() {
  cd "$srcdir/$pkgname-${pkgver}/src/syncterm"

  make PREFIX="$pkgdir/usr" MANPREFIX="$pkgdir/usr/share" RELEASE=1 install
}