root/trunk/freewrt/package/bogofilter/Makefile

Revision 2678, 1.5 kB (checked in by tg, 2 years ago)

the treebreaker ☺

overhaul the fetch'n'checksum system to be more bsd-like
• make fetch, make checksum supported
• future expansion possibilities already prepared:

– more distfiles than just one
– check sizes of downloaded files (size matters!!!!!111)
– more hashes than just MD5
– recursive fetch/checksum targets
– PERMIT_{SOURCES,DISTFILES}=Yes/«reason» – licence issues

• download.pl dies

quirks:
• GNU make only has a poor excuse for a .for loop
• some things (esp. toolchain and target/linux) now have

a ${WRKDIR} where they didn't have it before

• ${WRKDIR}/.checksum_done – no comment… it was necessary

because otherwise everything will get rebuilt every time
(did I mention that GNU make sucks?)

• I had troubles tracking the dependency problems down

because GNU make, unlike BSD make, doesn't have good debugging

• DISTFILES -> FULLDISTFILES
• DL_DIR -> DISTDIR
• PKG_SOURCE -> DISTFILES
• PKG_SOURCE_URL -> MASTER_SITES
• no @SF and @GNU any more, use BSD network.template syntax

(feel free to add more master sites)

• GNU make doesn't really strip whitespaces from variables…

(did I mention how much better BSD make is?)

• echo 'LOCAL_DISTFILES=/path/to/distfiles' >>${TOPDIR}/prefs.mk

will save the need to download 'em, Closes: #102

• MASTER_SITES now *must* have the trailing slashes (there may be

a few that don't and a few with double ones, please fix them)

I've tested that a normal build (unchanged .config from the default) works
on GNU/Linux. There's definitively room for improvement, but most of that
will come with the NFO system only. Fixes appreciated.

This work sponsored by AurISP, part of the NFO conversion project ☻

Line 
1 # $FreeWRT$
2 #-
3 # This file is part of the FreeWRT project. FreeWRT is copyrighted
4 # material, please see the LICENCE file in the top-level directory
5 # or at http://www.freewrt.org/licence for details.
6
7 include ${TOPDIR}/rules.mk
8
9 PKG_NAME:=                      bogofilter
10 PKG_VERSION:=           1.1.3
11 PKG_RELEASE:=           1
12 PKG_MD5SUM:=            a816f509324ccb9946a4d89fefe525e1
13 MASTER_SITES:=          http://ftp.debian.org/debian/pool/main/b/bogofilter/
14 DISTFILES:=             ${PKG_NAME}_${PKG_VERSION}.orig.tar.gz
15
16 include ${TOPDIR}/mk/package.mk
17
18 $(eval $(call PKG_template,BOGOFILTER,bogofilter,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
19
20 CONFIGURE_STYLE=        gnu
21 CONFIGURE_ENV+=         ac_cv_c_bigendian=no \
22                         ac_cv_sizeof_off_t=8 \
23                         ac_cv_sizeof_int=4 \
24                         ac_cv_sizeof_long=4 \
25                     LIBS="-liconv"
26 CONFIGURE_ARGS+=        --without-libsqlite3-prefix \
27                                         --without-libqdbm-prefix \
28                                         --with-included-gsl \
29                                         --with-libdb-prefix=${STAGING_DIR}/usr \
30                                         --disable-transactions
31 #                                       --without-libdb-prefix
32 BUILD_STYLE=            auto
33 INSTALL_STYLE=          auto
34
35 PKG_DEPENDS:=           libdb libiconv
36
37 post-install:
38         echo 'Depends: ${PKG_DEPENDS}' >>${IDIR_BOGOFILTER}/CONTROL/control
39         ${INSTALL_DIR} ${IDIR_BOGOFILTER}/usr/bin
40         ${INSTALL_BIN} ${WRKINST}/usr/bin/${PKG_NAME} ${IDIR_BOGOFILTER}/usr/bin/
41 ifeq (${FWRT_PACKAGE_BOGOFILTER_BOGOUTIL},y)
42         ${INSTALL_BIN} ${WRKINST}/usr/bin/bogoutil ${IDIR_BOGOFILTER}/usr/bin/
43 endif
44 ifeq (${FWRT_PACKAGE_BOGOFILTER_BOGOTUNE},y)
45         ${INSTALL_BIN} ${WRKINST}/usr/bin/bogotune ${IDIR_BOGOFILTER}/usr/bin/
46 endif
47
48 include ${TOPDIR}/mk/pkg-bottom.mk
Note: See TracBrowser for help on using the browser.