summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6a0c0186d3d65f7e01d9f9e23ea90d480f9b2df3 (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
58
59
60
61
62
63
pkgname=(husky-tosser husky-msged)
_realpkg=husky
pkgver=1.9_20170406
pkgrel=2
pkgdesc="Husky Fido Tosser"
arch=('x86_64')
license=('GPL')
url="http://husky.sourceforge.net/hpt.html"
source=('huskymak.cfg'
  'areastat_makefile'
  'nltools_makefile'
  'smapi_makefile'
  'msged_makefile'
  'msged_maps_makefile'
  "https://datapacket.dl.sourceforge.net/project/husky/husky/1.9-current/2017.04.06/husky-all-1.9-source-20170406.tgz"
)
_tosserModules="huskylib fidoconf smapi areafix hpt areastat bsopack sqpack nltools hptkill hptsqfix htick"
_buildModules="${_tosserModules} msged"
prepare() {
    cp -f huskymak.cfg ${_realpkg}/
    cp -f areastat_makefile ${_realpkg}/areastat/Makefile
    cp -f nltools_makefile ${_realpkg}/nltools/Makefile
    cp -f smapi_makefile ${_realpkg}/smapi/Makefile
    cp -f msged_makefile ${_realpkg}/msged/Makefile
    cp -f msged_maps_makefile ${_realpkg}/msged/maps/makefile.husky
}

build() {
    export LD_BACKUP="$LD_LIBRARY_PATH"
    export LD_LIBRARY_PATH="$LD_BACKUP:${srcdir}/${_realpkg}/huskylib:${srcdir}/${_realpkg}/fidoconf"
    for i in $_buildModules; do
         cd "${srcdir}/${_realpkg}/${i}"
         # if more than -j1, then build fails. Say hello to upstream
         make -j1
    done
    # We need original LD_LIBRARY_PATH for package() and further
    export LD_LIBRARY_PATH="$LD_BACKUP"
    export LD_BACKUP=""
}

package_husky-tosser() {
    pkgdesc="Husky Fido Tosser: hpt (tosser) and netmail/echomail tools"
    conflicts=("husky-all")
    for i in $_tosserModules; do
        cd "${srcdir}/${_realpkg}/${i}"
        make DESTDIR="$pkgdir" install
    done
}
package_husky-msged() {
    pkgdesc='Husky Fido Tosser: msged (message editor)'
    depends=('husky-tosser')
    conflicts=("husky-all")
    cd "${srcdir}/${_realpkg}/msged"
    make DESTDIR="$pkgdir" install
}

md5sums=('799c230ec374e22abcdb0b5452dce37c'
         '0ec212f2bb31d149cd1717ab681f519a'
         '48ba1f5f4ded114e500ef83ce1fe407a'
         'c7238eec644bd1aeaf0a0c993f5dd8fc'
         '0d09d7d863f9511d6ab9c49c636a8ad3'
         '4c66c7fcb56605e9a691a085c85e1080'
         '2b67ff873321f2d526818db7c440dca6')