-
Notifications
You must be signed in to change notification settings - Fork 0
/
DevIL.build
executable file
·114 lines (86 loc) · 2.15 KB
/
DevIL.build
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
#!/bin/bash
#
. build_funcs
TARNAME=DevIL
TARNAMEEXTRA=
TARDIR=${SOURCE}/d
#TAR_EXT=.tar.gz
VERSION=1.7.8
VERSIONEXTRA=
BUILD=4
WEBPAGE="http://openil.sourceforge.net/"
#TAR_PROG=
#TAR_OPTS=
PKGNAME=DevIL
#PKGVERSION=
#BUILD_SUFFIX=
#ARCH=noarch
FULL_TARNAME=${TARDIR}/${TARNAME}${TARNAMEEXTRA}-${VERSION}${VERSIONEXTRA}${TAR_EXT}
pre_unpack
PKG=/tmp/package-${PKGNAME}
if [ ! -f ${FULL_TARNAME} ]
then
echo Can\'t find ${FULL_TARNAME}
exit
fi
if [ ! -d ${TARNAME}-${VERSION} ]
then
${TAR_PROG} ${TAR_OPTS} ${FULL_TARNAME}
mv devil-${VERSION} ${TARNAME}-${VERSION}
if [ ! -d ${TARNAME}-${VERSION} ]
then
echo "${TARNAME}-${VERSION} directory not found"
exit
fi
(cd ${TARNAME}-${VERSION}
patch -p1 < ${CWD}/DevIL-1.7.8.diff
)
fi
pre_configure
cd ${TARNAME}-${VERSION}
fix_perms
if [ ${DO_CONFIGURE} == "yes" ]
then
CFLAGS="${SLKCFLAGS}" \
CXXFLAGS="${SLKCFLAGS}" \
./configure --prefix=/usr \
--sysconfdir=/etc \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--localstatedir=/var/lib \
--mandir=/usr/man \
--enable-ILU \
--enable-ILUT
fi
if [ ${DO_MAKE} == "yes" ]
then
make ${NUM_JOBS} || exit
fi
if [ ${DO_INSTALL} != "yes" ]
then
exit
fi
make install DESTDIR=${PKG}
#strip_binaries
fix_links
compress_manpages
compress_info
cp -a \
AUTHORS COPYING* INSTALL NEWS PLANS README* TODO \
${PKG}/usr/doc/${TARNAME}-${VERSION}
fix_docs
#-----handy-ruler-for-slack-desc-width-------------------------------|
make_slack_desc << EOF "Developer's Image Library"
Developer's Image Library (DevIL) is a programmer's library to develop
applications with very powerful image loading capabilities, yet is
easy for a developer to learn and use. Ultimate control of images is
left to the developer, so unnecessary conversions, etc. are not
performed. DevIL utilizes a simple, yet powerful, syntax. DevIL can
load, save, convert, manipulate, filter and display a wide variety
of image formats.
EOF
post_install
cd ${PKG}
su -c "chown -R root:root ${PKG}; \
find . -type d -exec chmod 755 {} \; ; \
makepkg -l y -c n ${PKGDIR}${PKGNAME}-${PKGVERSION}-${ARCH}-${BUILD}${BUILD_SUFFIX}.tgz; \
chown -R ${USERNAME}:${GROUP} ${PKG}"