root/trunk/freewrt/tools/sed/Makefile

Revision 2678, 1.3 kB (checked in by tg, 5 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 PKG_NAME:=              sed
8 PKG_VERSION:=           4.1.2
9 PKG_RELEASE:=           1
10 PKG_MD5SUM:=            928f0e06422f414091917401f1a834d0
11 MASTER_SITES:=          ftp://ftp.gnu.org/gnu/sed/
12
13 include $(TOPDIR)/rules.mk
14 include ../rules.mk
15 #include ${TOPDIR}/mk/fetch.mk
16
17 $(WRKBUILD)/.configured: ${WRKBUILD}/.prepared
18         @mkdir -p $(STAGING_TOOLS)/bin
19         (cd $(WRKBUILD); rm -rf config.cache; \
20                 ac_cv_header_wctype_h=no \
21                 ./configure \
22                 --disable-nls \
23                 --prefix=$(STAGING_TOOLS) \
24                 --disable-dependency-tracking \
25                 --disable-libtool-lock \
26         );
27         touch $@
28
29 $(WRKBUILD)/sed/sed: $(WRKBUILD)/.configured
30         $(MAKE) -C $(WRKBUILD)
31
32 source: ${_CHECKSUM_COOKIE}
33 prepare: ${WRKBUILD}/.prepared
34
35 compile: $(WRKBUILD)/sed/sed
36
37 install:
38         mkdir -p $(STAGING_TOOLS)/bin
39         rm -f $(STAGING_TOOLS)/bin/sed ${TOPDIR}/lbin/sed
40         install -c -s -m 555 ${WRKBUILD}/sed/sed $(STAGING_TOOLS)/bin/sed
41         cp $(STAGING_TOOLS)/bin/sed ${TOPDIR}/lbin/sed
42
43 install-lbin:
44         rm -f ${TOPDIR}/lbin/sed
45         if [ -e $(STAGING_TOOLS)/bin/sed ]; then \
46                 cp $(STAGING_TOOLS)/bin/sed ${TOPDIR}/lbin/sed; \
47         fi
48
49 clean:
50         rm -rf $(WRKBUILD)
51         rm -f $(STAGING_TOOLS)/bin/sed ${TOPDIR}/lbin/sed
Note: See TracBrowser for help on using the browser.