-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
template
141 lines (127 loc) · 3.69 KB
/
template
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# Template file for 'boinc'
pkgname=boinc
version=8.0.2
revision=1
_majorver=${version%.*}
build_style=gnu-configure
hostmakedepends="automake libtool pkg-config xorgproto shared-mime-info"
makedepends="glu-devel libfreeglut-devel libcurl-devel
libjpeg-turbo-devel libnotify-devel sqlite-devel libxcb-devel
libXmu-devel libXi-devel wxWidgets-gtk3-devel"
depends="curl ca-certificates"
conf_files="/etc/default/boinc-client"
short_desc="Berkely Infrastructure for Network Computing"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-3.0-or-later"
homepage="https://boinc.berkeley.edu/"
distfiles="https://github.com/BOINC/boinc/archive/client_release/${_majorver}/${version}.tar.gz>boinc-${version}.tar.gz"
checksum=c593f157aacbd61bf814f44ed6e4dbb38145336d5c018c756206bdfc0c6df33e
system_accounts="boinc"
boinc_homedir="/var/lib/boinc"
boinc_shell="/bin/bash"
conflicts="boinc-nox>=0"
CXXFLAGS="-Wno-redundant-decls -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
pre_configure() {
autoreconf -if
}
do_configure() {
if [ -n "$CROSS_BUILD" ]; then
# XXX: cross building used to be a lot easier
# Set include paths for configure to find dependencies.
CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/glib-2.0"
CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/lib/glib-2.0/include"
CXXFLAGS+=" ${CFLAGS}"
echo "CFLAGS: $CFLAGS"
echo "CXXFLAGS: $CXXFLAGS"
export LIBNOTIFY_CFLAGS="${CFLAGS}"
export LIBNOTIFY_LIBS="-L${XBPS_CROSS_BASE}/usr/lib -lnotify"
fi
mkdir /tmp/x11
mv * /tmp/x11
mv /tmp/x11 .
mkdir nox
cp -ar x11/* nox
cd ${wrksrc}/x11
PKG_CONFIG=pkg-config \
PKG_CONFIG_PATH=${XBPS_CROSS_BASE}/usr/lib/pkgconfig \
LDFLAGS="${LDFLAGS} -lX11" \
./configure \
${configure_args} \
--enable-libraries \
--enable-unicode \
--enable-shared \
--enable-static \
--enable-dynamic-client-linkage \
--enable-client \
--enable-manager \
--disable-server \
--with-ssl=${XBPS_CROSS_BASE}/usr \
--with-x=${XBPS_CROSS_BASE}/usr \
--with-wx-config=${XBPS_CROSS_BASE}/usr/bin/wx-config-gtk3 \
--with-wx-prefix=${XBPS_CROSS_BASE}/usr
cd ${wrksrc}/nox
PKG_CONFIG=pkg-config \
PKG_CONFIG_PATH=${XBPS_CROSS_BASE}/usr/lib/pkgconfig \
./configure \
${configure_args} \
--enable-libraries \
--enable-unicode \
--enable-shared \
--enable-static \
--enable-dynamic-client-linkage \
--enable-client \
--disable-manager \
--disable-server \
--disable-server \
--with-ssl=${XBPS_CROSS_BASE}/usr \
--without-x \
--without-wxdir
}
do_build() {
cd ${wrksrc}/x11
make ${makejobs}
cd ${wrksrc}/nox
make ${makejobs}
}
do_install() {
cd ${wrksrc}/x11
make ${makejobs} DESTDIR="${DESTDIR}" install
if [ -f "${DESTDIR}/etc/boinc-client.conf" ]; then
vmkdir etc/default
mv "${DESTDIR}"/etc/boinc-client.conf \
"${DESTDIR}"/etc/default/boinc-client
fi
vinstall client/scripts/boinc.bash 644 usr/share/bash-completion/completions boinc
vsv boinc
}
boinc-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}
boinc-nox_package() {
short_desc+=" - no X"
conflicts="boinc>=0"
system_accounts="boinc"
boinc_homedir="/var/lib/boinc"
boinc_shell="/bin/bash"
pkg_install() {
cd ${wrksrc}/nox
make ${makejobs} DESTDIR=${PKGDESTDIR} install
if [ -f "${PKGDESTDIR}/etc/boinc-client.conf" ]; then
vmkdir etc/default
mv "${PKGDESTDIR}"/etc/boinc-client.conf \
"${PKGDESTDIR}"/etc/default/boinc-client
fi
# no devel package - no includes, *.a and *.so
rm -rf ${PKGDESTDIR}/usr/include
rm -f ${PKGDESTDIR}/usr/lib/*.a
rm -f ${PKGDESTDIR}/usr/lib/*.so
vinstall client/scripts/boinc.bash 644 usr/share/bash-completion/completions boinc
vsv boinc
}
}