Mercurial > hg > mxe-octave-anirudha
annotate src/file.mk @ 2525:4d0f3a9da57e
all packages: use $(WGET) portability variable
author | Tony Theodore <tonyt@logyst.com> |
---|---|
date | Wed, 09 May 2012 01:16:05 +1000 |
parents | b5321bdec505 |
children | 47558e958113 |
rev | line source |
---|---|
2333
f653602a0500
Rebrand to new project name MXE
Volker Grabsch <vog@notjusthosting.com>
parents:
2276
diff
changeset
|
1 # This file is part of MXE. |
2353
99516e73b368
Move doc/index.html -> index.html
Volker Grabsch <vog@notjusthosting.com>
parents:
2349
diff
changeset
|
2 # See index.html for further information. |
2051
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
3 |
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
4 PKG := file |
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
5 $(PKG)_IGNORE := |
2251 | 6 $(PKG)_CHECKSUM := df8ffe8759ec8cd85a98dc98e858563ea2555f64 |
2051
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
7 $(PKG)_SUBDIR := file-$($(PKG)_VERSION) |
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
8 $(PKG)_FILE := file-$($(PKG)_VERSION).tar.gz |
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
9 $(PKG)_URL := ftp://ftp.astron.com/pub/file/$($(PKG)_FILE) |
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
10 $(PKG)_DEPS := gcc libgnurx |
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
11 |
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
12 define $(PKG)_UPDATE |
2525
4d0f3a9da57e
all packages: use $(WGET) portability variable
Tony Theodore <tonyt@logyst.com>
parents:
2365
diff
changeset
|
13 $(WGET) -q -O- 'ftp://ftp.astron.com/pub/file/' | \ |
2051
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
14 grep 'file-' | \ |
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
15 $(SED) -n 's,.*file-\([0-9][^>]*\)\.tar.*,\1,p' | \ |
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
16 tail -1 |
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
17 endef |
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
18 |
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
19 define $(PKG)_BUILD |
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
20 # "file" needs a runnable version of the "file" utility |
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
21 # itself. This must match the source code regarding its |
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
22 # version. Therefore we build a native one ourselves first. |
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
23 |
2276
104e9e22453b
package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents:
2251
diff
changeset
|
24 cp -Rp '$(1)' '$(1).native' |
104e9e22453b
package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents:
2251
diff
changeset
|
25 cd '$(1).native' && ./configure \ |
2051
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
26 --disable-shared |
2276
104e9e22453b
package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents:
2251
diff
changeset
|
27 $(MAKE) -C '$(1).native/src' -j '$(JOBS)' file |
2051
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
28 |
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
29 cd '$(1)' && ./configure \ |
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
30 --host='$(TARGET)' \ |
2276
104e9e22453b
package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents:
2251
diff
changeset
|
31 --build="`config.guess`" \ |
2051
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
32 --disable-shared \ |
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
33 --prefix='$(PREFIX)/$(TARGET)' |
2276
104e9e22453b
package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents:
2251
diff
changeset
|
34 $(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= man_MANS= FILE_COMPILE='$(1).native/src/file' |
104e9e22453b
package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents:
2251
diff
changeset
|
35 $(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= man_MANS= |
104e9e22453b
package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents:
2251
diff
changeset
|
36 |
104e9e22453b
package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents:
2251
diff
changeset
|
37 '$(TARGET)-gcc' \ |
104e9e22453b
package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents:
2251
diff
changeset
|
38 -W -Wall -Werror -ansi -pedantic \ |
104e9e22453b
package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents:
2251
diff
changeset
|
39 '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-file.exe' \ |
104e9e22453b
package file: reorganise and add test program
Tony Theodore <tonyt@logyst.com>
parents:
2251
diff
changeset
|
40 -lmagic -lgnurx -lshlwapi |
2051
18265b282d7a
new packages: file libgnurx lzo
Moritz Bunkus <moritz@bunkus.org>
parents:
diff
changeset
|
41 endef |