archrelease: copy trunk to community-any
[arch-community.git] / fasm / trunk / PKGBUILD
blob529b8a968c1dd892d1fa1c58cf9f3b1656d9e5f6
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: Chris Andrews <christophersimonandrews [at] gmail [dot] com>
3 # Contributor: FadeMind <fademind@gmail.com>
4 # Contributor: Serge Victor <arch@random.re>
5 # Contributor: Krzysztof Wloch <wloszekk [at] gmail [dot] com>
6 # Contributor: Luke McCarthy <luke@iogopro.co.uk>
8 pkgname=fasm
9 pkgver=1.73.30
10 pkgrel=1
11 pkgdesc='Fast and efficient self-assembling x86 assembler for DOS, Windows and Linux operating systems'
12 url='https://flatassembler.net/'
13 arch=('x86_64')
14 license=('custom')
15 depends_x86_64=('lib32-glibc' 'lib32-gcc-libs')
16 source=(https://flatassembler.net/${pkgname}-${pkgver}.tgz)
17 sha512sums=('1f2fa2099be41c6d30acde5361293a67b31a2f8e63f5a9bfb2b0becc53cb519340e6382c9a0d13da9a898912a8f556a53b372c74e208314c0a72ed3bec97c41a')
18 b2sums=('6364e455cb487a81cabe66ad4f747ae4d2773ff8d4dbc9ef118a6426eefb043e635611cea58b1e727822f905c3140a63b4d06d60f92d363ce7e06c9e6fb9f76b')
20 build() {
21   cd ${pkgname}
23   if [ "${CARCH}" == "x86_64" ]; then
24     SRCDIR=Linux/x64
25     ./fasm.x64 source/${SRCDIR}/fasm.asm
26   fi
27   mv source/${SRCDIR}/fasm ./fasm
29   # tools
30   local s
31   for s in listing prepsrc symbols; do
32     ./fasm tools/libc/${s}.asm ${s}.o
33     gcc -m32 ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o ${s} ${s}.o
34   done
37 package() {
38   cd ${pkgname}
40   install -Dm 755 fasm -t "${pkgdir}/usr/bin"
41   # tools
42   local s
43   for s in listing prepsrc symbols; do
44     install -Dm 755 ${s} "${pkgdir}/usr/bin/fasm-${s}"
45   done
47   # docs
48   install -Dm 644 ${pkgname}.txt whatsnew.txt -t "${pkgdir}/usr/share/doc/${pkgname}"
49   install -Dm 644 examples/elfexe/*.asm -t "${pkgdir}/usr/share/doc/${pkgname}/examples/elfexe"
50   install -Dm 644 examples/elfexe/dynamic/*.asm -t "${pkgdir}/usr/share/doc/${pkgname}/examples/elfexe/dynamic"
51   install -Dm 644 examples/elfexe/dynamic/*.inc -t "${pkgdir}/usr/share/doc/${pkgname}/examples/elfexe/dynamic"
52   install -Dm 644 examples/elfobj/*.asm -t "${pkgdir}/usr/share/doc/${pkgname}/examples/elfobj"
53   install -Dm 644 examples/libcdemo/*.asm -t "${pkgdir}/usr/share/doc/${pkgname}/examples/libcdemo"
54   install -Dm 644 examples/libcdemo/*.inc -t "${pkgdir}/usr/share/doc/${pkgname}/examples/libcdemo"
55   install -Dm 644 license.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
58 # vim: ts=2 sw=2 et: