forked from msys2/MINGW-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPKGBUILD
More file actions
46 lines (41 loc) · 1.35 KB
/
Copy pathPKGBUILD
File metadata and controls
46 lines (41 loc) · 1.35 KB
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
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=discount
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=2.1.6
pkgrel=1
pkgdesc="A Markdown implementation written in C (mingw-w64)"
arch=('any')
url="http://www.pell.portland.or.us/~orc/Code/discount/"
license=('custom:BSD')
provides=('markdown')
conflicts=('markdown')
options=('strip' 'staticlibs')
source=(http://www.pell.portland.or.us/~orc/Code/discount/${_realname}-$pkgver.tar.bz2
discount-mingw-building.patch)
md5sums=('6f44e627777b6392f8f4a3280642482a'
'5235a54f0a3e8e61a11c42f3541e9582')
prepare() {
cd "${srcdir}"/${_realname}-${pkgver}
patch -p0 -i ${srcdir}/discount-mingw-building.patch
}
build() {
cd "${srcdir}"/${_realname}-${pkgver}
sed -e "s/m 444/m 644/g" -i configure.inc
export CFLAGS="-O2 -pipe -I${MINGW_PREFIX}/include"
MSYSTEM=MINGW \
CC=${MINGW_PREFIX}/bin/gcc.exe \
AC_CPP_PROG=${MINGW_PREFIX}/bin/cpp.exe \
AC_LN_PROG="cp -pR" \
./configure.sh \
--prefix=${MINGW_PREFIX} \
--enable-all-features \
--shared
make
}
package() {
cd "$srcdir/${_realname}-$pkgver"
mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,include,lib}
make DESTDIR="$pkgdir" install.everything
mv ${pkgdir}${MINGW_PREFIX}/lib/*.dll ${pkgdir}${MINGW_PREFIX}/bin/
install -Dm644 COPYRIGHT "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
}