root/trunk/freewrt/package/cbtt/Makefile

Revision 2678, 1.1 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:=              cbtt
10 PKG_VERSION:=           20060211
11 PKG_RELEASE:=           1
12 PKG_MD5SUM:=            19abea2817c49ccc9438e9671c402984
13 DISTFILES:=             ${PKG_NAME}80-${PKG_VERSION}-src.tar.gz
14 MASTER_SITES:=          ${MASTER_SITE_SOURCEFORGE:=bnbtusermods/}
15 WRKDIST=                ${WRKDIR}/${PKG_NAME}80-${PKG_VERSION}-src
16
17 include ${TOPDIR}/mk/package.mk
18
19 $(eval $(call PKG_template,CBTT,cbtt,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
20 $(eval $(call PKG_template,CBTT_MYSQL,cbtt-mysql,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
21
22 BUILD_STYLE=            auto
23 TLDFLAGS+=              -L. -L${STAGING_DIR}/usr/lib/mysql \
24                         -lpthread -lz -lmysqlclient -nodefaultlibs \
25                         -luClibc++ -lc -lm -lgcc
26 TCFLAGS+=               -fno-builtin -fno-rtti -nostdinc++ ${TLDFLAGS}
27
28 do-install:
29         ${INSTALL_DIR} ${IDIR_CBTT}/usr/bin
30         ${INSTALL_BIN} ${WRKBUILD}/bnbt ${IDIR_CBTT}/usr/bin/
31         ${INSTALL_DIR} ${IDIR_CBTT_MYSQL}/usr/bin
32         ${INSTALL_BIN} ${WRKBUILD}/bnbtmysql ${IDIR_CBTT_MYSQL}/usr/bin/
33
34 include ${TOPDIR}/mk/pkg-bottom.mk
Note: See TracBrowser for help on using the browser.