WiP! public makefiles
This commit is contained in:
parent
a9bd3c5df5
commit
7b108f326a
|
@ -0,0 +1,44 @@
|
||||||
|
include_rules
|
||||||
|
|
||||||
|
ifndef SCULPT_VERSION
|
||||||
|
error CONFIG_SCULPT_VERSION is undefined
|
||||||
|
endif
|
||||||
|
|
||||||
|
: $(DEPOT_DIR)/<bin-archives> $(DEPOT_DIR)/<raw> |> \
|
||||||
|
for f in %<bin-archives>; do tail -n1 $f >> %o; done; \
|
||||||
|
for f in %<raw>; do echo $f | awk -F / '{print "local/raw/"$4"/"$5}' - >> %o; done; \
|
||||||
|
|> $(BIN_LISTING)
|
||||||
|
# Generate a listing of all binary archives
|
||||||
|
|
||||||
|
: $(DEPOT_DIR)/<pkg> |> \
|
||||||
|
echo PUBLIC_USER=@(PUBLIC_USER) >> %o; \
|
||||||
|
echo PUBLIC_KEY=@(PUBLIC_KEY) >> %o; \
|
||||||
|
for f in %<pkg>; \
|
||||||
|
do \
|
||||||
|
b2sum -l 24 $f | awk -f errata/pkg.mk.awk >> %o; \
|
||||||
|
done; \
|
||||||
|
|> Makefile
|
||||||
|
# Generate the makefile for creating signed tarballs
|
||||||
|
|
||||||
|
DEPOT_INDEX_FILE = $(DEPOT_DIR)/index/@(SCULPT_VERSION)
|
||||||
|
|
||||||
|
ifneq (@(DEPOT_USER),local)
|
||||||
|
: index.xml |> tup varsed %f - | xmllint - > %o |> $(DEPOT_INDEX_FILE) {index}
|
||||||
|
else
|
||||||
|
: $(DEPOT_DIR)/<runtime> $(DEPOT_DIR)/<libretro-runtimes> |> ^ generate index^ \
|
||||||
|
echo '<index>' > %o; \
|
||||||
|
echo ' <index name="Libretro">' >> %o; \
|
||||||
|
echo %<libretro-runtimes> | tr ' ' '\n' | sort |\
|
||||||
|
sed \
|
||||||
|
-e 's|depot/| <pkg path="|' \
|
||||||
|
-e 's|runtime|"/>|' \
|
||||||
|
- >> %o; \
|
||||||
|
echo ' </index>' >> %o; \
|
||||||
|
echo %<runtime> | tr ' ' '\n' | sort |\
|
||||||
|
sed \
|
||||||
|
-e 's|depot/| <pkg path="|' \
|
||||||
|
-e 's|runtime|"/>|' \
|
||||||
|
- >> %o; \
|
||||||
|
echo '</index>' >> %o |> $(DEPOT_INDEX_FILE) {index}
|
||||||
|
endif
|
||||||
|
# Generate the depot index file
|
21
Tuprules.tup
21
Tuprules.tup
|
@ -1,5 +1,14 @@
|
||||||
.gitignore
|
.gitignore
|
||||||
|
|
||||||
|
BIN_LISTING = $(TUP_CWD)/bin-list
|
||||||
|
PKG_LISTING = $(TUP_CWD)/pkg-list
|
||||||
|
|
||||||
|
!collect_pkg_archives = |> ^ COLLECT pkg/%d/archives^ cp %f %o \
|
||||||
|
|> $(DEPOT_PKG_DIR)/%d/@(DEPOT_VERSION)/archives $(DEPOT_DIR)/<pkg>
|
||||||
|
|
||||||
|
!collect_pkg_runtime = |> ^ COLLECT pkg/%d/runtime^ cp %f %o \
|
||||||
|
|> $(DEPOT_PKG_DIR)/%d/@(DEPOT_VERSION)/runtime $(DEPOT_DIR)/<runtime>
|
||||||
|
|
||||||
SDK_INCLUDE = $(TUP_CWD)/sdk.tup
|
SDK_INCLUDE = $(TUP_CWD)/sdk.tup
|
||||||
|
|
||||||
export PKG_CONFIG_PATH
|
export PKG_CONFIG_PATH
|
||||||
|
@ -13,6 +22,10 @@ ifndef DEPOT_VERSION
|
||||||
error CONFIG_DEPOT_VERSION is undefined
|
error CONFIG_DEPOT_VERSION is undefined
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
BIN_VERSION=current
|
||||||
|
PKG_VERSION=current
|
||||||
|
RAW_VERSION=current
|
||||||
|
|
||||||
DEPOT_DIR = $(TUP_CWD)/depot/@(DEPOT_USER)
|
DEPOT_DIR = $(TUP_CWD)/depot/@(DEPOT_USER)
|
||||||
PUBLIC_DIR = $(TUP_CWD)/public/@(DEPOT_USER)
|
PUBLIC_DIR = $(TUP_CWD)/public/@(DEPOT_USER)
|
||||||
|
|
||||||
|
@ -29,11 +42,13 @@ PUBLIC_RAW_DIR = $(PUBLIC_DIR)/raw
|
||||||
|
|
||||||
ERRATA_DIR = $(TUP_CWD)/errata
|
ERRATA_DIR = $(TUP_CWD)/errata
|
||||||
|
|
||||||
!archives_to_depot = |> ^ varse %d archives^ tup varsed %f %o |> $(DEPOT_PKG_DIR)/%d/@(DEPOT_VERSION)/archives
|
!archives_to_depot = |> |>
|
||||||
|
#!archives_to_depot = |> ^ varse %d archives^ tup varsed %f %o |> $(DEPOT_PKG_DIR)/%d/@(DEPOT_VERSION)/archives
|
||||||
|
|
||||||
!runtime_to_depot = |> ^ validate %d runtime^ \
|
!runtime_to_depot = |> |>
|
||||||
|
#!runtime_to_depot = |> ^ validate %d runtime^ \
|
||||||
xmllint -schema $(ERRATA_DIR)/runtime.xsd --noout %f ; cp %f %o \
|
xmllint -schema $(ERRATA_DIR)/runtime.xsd --noout %f ; cp %f %o \
|
||||||
|> $(DEPOT_PKG_DIR)/%d/@(DEPOT_VERSION)/runtime $(DEPOT_DIR)/<runtimes>
|
|> $(DEPOT_PKG_DIR)/%d/@(DEPOT_VERSION)/runtime
|
||||||
|
|
||||||
!pkg_extra_to_depot = |> ^ CP %o^ cp %f %o |> $(DEPOT_PKG_DIR)/%d/@(DEPOT_VERSION)/%b
|
!pkg_extra_to_depot = |> ^ CP %o^ cp %f %o |> $(DEPOT_PKG_DIR)/%d/@(DEPOT_VERSION)/%b
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ split($2,a,"/") }
|
||||||
|
{ src=a[1]"/"a[2]"/"a[3]"/"a[4]"/"a[5] }
|
||||||
|
{ tar="public/$(PUBLIC_USER)/pkg/"a[4]"/"$1".tar.xz" }
|
||||||
|
{ sig=tar".sig" }
|
||||||
|
|
||||||
|
{ print sig": "tar}
|
||||||
|
{ print " gpg --detach-sign --digest-algo SHA256 --no-tty --local-user $(PUBLIC_KEY) < $< > tmp" }
|
||||||
|
{ print " mv tmp $@" }
|
||||||
|
|
||||||
|
{ print tar": "$2 }
|
||||||
|
{ print " mkdir -p $(dir $@) "$1 }
|
||||||
|
{ print " cp "src"/* "$1 }
|
||||||
|
{ print " sed 's|^local/|$(PUBLIC_USER)/|' "src"/archives > "$1"/archives" }
|
||||||
|
{ print " tar cfj $@ "$1 }
|
||||||
|
{ print " rm -r " $1 }
|
|
@ -1,32 +0,0 @@
|
||||||
include_rules
|
|
||||||
|
|
||||||
ifndef SCULPT_VERSION
|
|
||||||
error CONFIG_SCULPT_VERSION is undefined
|
|
||||||
endif
|
|
||||||
|
|
||||||
DEPOT_INDEX_FILE = $(DEPOT_DIR)/index/@(SCULPT_VERSION)
|
|
||||||
|
|
||||||
ifneq (@(DEPOT_USER),local)
|
|
||||||
: index.xml |> tup varsed %f - | xmllint - > %o |> $(DEPOT_INDEX_FILE) {index}
|
|
||||||
else
|
|
||||||
: $(DEPOT_DIR)/<runtimes> $(DEPOT_DIR)/<libretro-runtimes> |> ^ generate index^ \
|
|
||||||
echo '<index>' > %o; \
|
|
||||||
echo ' <index name="Libretro">' >> %o; \
|
|
||||||
echo %<libretro-runtimes> | tr ' ' '\n' | sort |\
|
|
||||||
sed \
|
|
||||||
-e 's|\.\./depot/| <pkg path="|' \
|
|
||||||
-e 's|runtime|"/>|' \
|
|
||||||
- >> %o; \
|
|
||||||
echo ' </index>' >> %o; \
|
|
||||||
echo %<runtimes> | tr ' ' '\n' | sort |\
|
|
||||||
sed \
|
|
||||||
-e 's|\.\./depot/| <pkg path="|' \
|
|
||||||
-e 's|runtime|"/>|' \
|
|
||||||
- >> %o; \
|
|
||||||
echo '</index>' >> %o |> $(DEPOT_INDEX_FILE) {index}
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef DEPOT_KEY
|
|
||||||
: {index} |> xz -c %f > %o |> $(PUBLIC_DIR)/index/%b.xz {dist}
|
|
||||||
: {dist} |> !public_signature |>
|
|
||||||
endif
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
LIBRETRO_COMM_DIR = $(TUP_CWD)/libretro-common
|
||||||
|
GIT_VERSION = `git describe --always`
|
||||||
|
BIN_VERSION = $(GIT_VERSION)
|
|
@ -28,7 +28,12 @@ DEPOT_NAME = libretro-$(TARGET_NAME)
|
||||||
|
|
||||||
!publish_core = | libretro.so |> ^ STRIP %f^ \
|
!publish_core = | libretro.so |> ^ STRIP %f^ \
|
||||||
strip -o %o %f \
|
strip -o %o %f \
|
||||||
|> $(DEPOT_BIN_DIR)/$(DEPOT_NAME)/@(DEPOT_VERSION)/%b\
|
|> $(DEPOT_BIN_DIR)/$(DEPOT_NAME)/@(DEPOT_VERSION)/%b
|
||||||
|
|
||||||
|
!bin_archives = |> \
|
||||||
|
echo $(REMOTE_DEPENDS) _/src/$(DEPOT_NAME)/$(BIN_VERSION) | tr ' ' '\n' > %o; \
|
||||||
|
|> $(DEPOT_BIN_DIR)/$(DEPOT_NAME)/@(DEPOT_VERSION)/_archives \
|
||||||
|
$(DEPOT_DIR)/<bin-archives>
|
||||||
|
|
||||||
!publish_core_raw = |> ^o copy %b^ cp %f %o \
|
!publish_core_raw = |> ^o copy %b^ cp %f %o \
|
||||||
|> $(DEPOT_RAW_DIR)/$(DEPOT_NAME)/@(DEPOT_VERSION)/%b
|
|> $(DEPOT_RAW_DIR)/$(DEPOT_NAME)/@(DEPOT_VERSION)/%b
|
||||||
|
@ -73,5 +78,3 @@ endif
|
||||||
LINK_T = $(TUP_CWD)/link.T
|
LINK_T = $(TUP_CWD)/link.T
|
||||||
DEFINES += -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565
|
DEFINES += -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565
|
||||||
NO_UNDEFINED = --no-undefined
|
NO_UNDEFINED = --no-undefined
|
||||||
|
|
||||||
LIBRETRO_COMM_DIR = $(TUP_CWD)/../libretro-common
|
|
||||||
|
|
|
@ -22,3 +22,10 @@ CXXFLAGS += -fno-rtti -fno-exceptions
|
||||||
|
|
||||||
: {binary} |> !core_publish_bin |>
|
: {binary} |> !core_publish_bin |>
|
||||||
: {package} |> !core_publish_pkg |>
|
: {package} |> !core_publish_pkg |>
|
||||||
|
|
||||||
|
REMOTE_DEPENDS += \
|
||||||
|
@(SDK_USER)/src/vfs/@(SDK_VERSION) \
|
||||||
|
@(SDK_USER)/src/libc/@(SDK_VERSION) \
|
||||||
|
@(SDK_USER)/src/stdcxx/@(SDK_VERSION) \
|
||||||
|
|
||||||
|
: |> !bin_archives |>
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
: archives |> !archives_to_depot |> {package}
|
: $(BIN_LISTING) |> ^ GENERATE %o^ \
|
||||||
: ../runtime |> !runtime_to_depot |> {package}
|
echo $(REMOTE_DEPENDS) | tr ' ' '\n' > archives; \
|
||||||
: {package} |> !publish_pkg |>
|
for i in $(LOCAL_DEPENDS); do \
|
||||||
|
grep $i %f >> archives; \
|
||||||
|
done; \
|
||||||
|
|> archives
|
||||||
|
|
||||||
|
: ../runtime |> !collect_pkg_runtime |>
|
||||||
|
: archives |> !collect_pkg_archives |>
|
||||||
|
|
|
@ -1,16 +1,19 @@
|
||||||
|
REMOTE_DEPENDS += \
|
||||||
|
@(SDK_USER)/src/vfs/@(SDK_VERSION) \
|
||||||
|
@(SDK_USER)/src/libc/@(SDK_VERSION) \
|
||||||
|
@(SDK_USER)/src/stdcxx/@(SDK_VERSION) \
|
||||||
|
|
||||||
|
LOCAL_DEPENDS += \
|
||||||
|
_/src/libretro-nxengine \
|
||||||
|
_/src/retro_frontend \
|
||||||
|
_/raw/cave_story-en \
|
||||||
|
|
||||||
include_rules
|
include_rules
|
||||||
|
|
||||||
: |> wget --quiet https://www.cavestory.org/downloads/%o |> cavestoryen.zip {zip}
|
: |> wget --quiet https://www.cavestory.org/downloads/%o |> cavestoryen.zip {zip}
|
||||||
|
|
||||||
VERSION = 2004.12
|
RAW_VERSION = 2004.12
|
||||||
|
|
||||||
: {zip} \
|
: {zip} \
|
||||||
|> unzip -D %f -d tmp ; tar cf %o -C tmp/CaveStory . ; rm -r tmp \
|
|> unzip -qD %f -d tmp ; tar cf %o -C tmp/CaveStory . ; rm -r tmp \
|
||||||
|> $(DEPOT_RAW_DIR)/%d/$(VERSION)/doukutsu.tar {raw}
|
|> $(DEPOT_RAW_DIR)/%d/$(RAW_VERSION)/doukutsu.tar $(DEPOT_DIR)/<raw>
|
||||||
|
|
||||||
!publish_raw = |> ^o publish %d raw^ \
|
|
||||||
tar cfJ %o -C $(DEPOT_RAW_DIR)/%d . ; $(SIGN_CMD) < %o > %o.sig \
|
|
||||||
|> $(PUBLIC_RAW_DIR)/%d/$(VERSION).tar.xz \
|
|
||||||
| $(PUBLIC_RAW_DIR)/%d/$(VERSION).tar.xz.sig
|
|
||||||
|
|
||||||
: {raw} |> !publish_raw |>
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
@SDK_USER@/src/vfs/@SDK_VERSION@
|
|
||||||
@SDK_USER@/src/libc/@SDK_VERSION@
|
|
||||||
@SDK_USER@/src/stdcxx/@SDK_VERSION@
|
|
||||||
@DEPOT_USER@/src/retro_frontend/@DEPOT_VERSION@
|
|
||||||
@DEPOT_USER@/src/libretro-nxengine/@DEPOT_VERSION@
|
|
||||||
@DEPOT_USER@/raw/cave_story-en/2004.12
|
|
|
@ -7,5 +7,8 @@ CONFIG_DEPOT_USER=local
|
||||||
CONFIG_DEPOT_VERSION=current
|
CONFIG_DEPOT_VERSION=current
|
||||||
#CONFIG_DEPOT_KEY=6E10414EE7160781F5FEE8FFB14D043A26B3D2C7
|
#CONFIG_DEPOT_KEY=6E10414EE7160781F5FEE8FFB14D043A26B3D2C7
|
||||||
|
|
||||||
|
CONFIG_PUBLIC_USER=ehmry
|
||||||
|
CONFIG_PUBLIC_KEY=6E10414EE7160781F5FEE8FFB14D043A26B3D2C7
|
||||||
|
|
||||||
CONFIG_PUBLIC_SRC_MESA=nfeske/src/mesa/2019-02-19
|
CONFIG_PUBLIC_SRC_MESA=nfeske/src/mesa/2019-02-19
|
||||||
CONFIG_PUBLIC_SRC_EXPAT=nfeske/src/expat/2019-02-19
|
CONFIG_PUBLIC_SRC_EXPAT=nfeske/src/expat/2019-02-19
|
||||||
|
|
Loading…
Reference in New Issue