2013-03-24 14:08:42 +00:00
|
|
|
# the repository might not have been checked out yet, so make this
|
|
|
|
# able to fail:
|
|
|
|
-include koreader-base/Makefile.defs
|
|
|
|
|
|
|
|
# we want VERSION to carry the version of koreader, not koreader-base
|
|
|
|
VERSION=$(shell git describe HEAD)
|
|
|
|
|
|
|
|
# subdirectory we use to build the installation bundle
|
2013-03-24 15:52:39 +00:00
|
|
|
INSTALL_DIR=koreader
|
2013-03-24 14:08:42 +00:00
|
|
|
|
|
|
|
# files to copy from main directory
|
|
|
|
LUA_FILES=reader.lua
|
2011-11-16 22:52:26 +00:00
|
|
|
|
2013-03-24 12:25:52 +00:00
|
|
|
all: koreader-base/koreader-base koreader-base/extr
|
2011-11-14 18:17:14 +00:00
|
|
|
|
2013-03-24 12:25:52 +00:00
|
|
|
koreader-base/koreader-base:
|
|
|
|
cd koreader-base && make koreader-base
|
2011-11-14 18:17:14 +00:00
|
|
|
|
2013-03-24 12:25:52 +00:00
|
|
|
koreader-base/extr:
|
|
|
|
cd koreader-base && make extr
|
2011-12-02 22:10:59 +00:00
|
|
|
|
2011-11-14 18:17:14 +00:00
|
|
|
fetchthirdparty:
|
2012-03-08 13:03:18 +00:00
|
|
|
git submodule init
|
2012-03-07 16:19:52 +00:00
|
|
|
git submodule update
|
2013-03-24 12:25:52 +00:00
|
|
|
cd koreader-base && make fetchthirdparty
|
2011-11-14 18:17:14 +00:00
|
|
|
|
|
|
|
clean:
|
2013-03-24 12:25:52 +00:00
|
|
|
cd koreader-base && make clean
|
2011-11-14 18:17:14 +00:00
|
|
|
|
|
|
|
cleanthirdparty:
|
2013-03-24 12:25:52 +00:00
|
|
|
cd koreader-base && make cleanthirdparty
|
2012-09-17 20:38:05 +00:00
|
|
|
|
2013-03-24 16:18:53 +00:00
|
|
|
setupemu:
|
|
|
|
test -d libs-emu || ln -s koreader-base/libs-emu ./
|
|
|
|
test -d fonts || ln -s koreader-base/fonts ./
|
|
|
|
test -d data || ln -s koreader-base/data ./
|
|
|
|
|
2013-03-24 14:08:42 +00:00
|
|
|
customupdate: koreader-base/koreader-base koreader-base/extr
|
2012-10-24 10:24:05 +00:00
|
|
|
# ensure that the binaries were built for ARM
|
2013-03-24 12:25:52 +00:00
|
|
|
file koreader-base/koreader-base | grep ARM || exit 1
|
|
|
|
file koreader-base/extr | grep ARM || exit 1
|
2013-03-24 15:52:39 +00:00
|
|
|
rm -f koreader-$(VERSION).zip
|
2012-10-02 21:18:28 +00:00
|
|
|
rm -rf $(INSTALL_DIR)
|
2012-11-02 09:37:13 +00:00
|
|
|
mkdir -p $(INSTALL_DIR)/{history,screenshots,clipboard,libs}
|
2013-03-24 14:08:42 +00:00
|
|
|
cp -p README.md COPYING koreader-base/koreader-base koreader-base/extr kpdf.sh $(LUA_FILES) $(INSTALL_DIR)
|
|
|
|
$(STRIP) --strip-unneeded $(INSTALL_DIR)/koreader-base $(INSTALL_DIR)/extr
|
2012-04-08 01:58:51 +00:00
|
|
|
mkdir $(INSTALL_DIR)/data
|
2013-03-24 14:08:42 +00:00
|
|
|
cp -L koreader-base/$(DJVULIB) koreader-base/$(CRELIB) koreader-base/$(LUALIB) koreader-base/$(K2PDFOPTLIB) $(INSTALL_DIR)/libs
|
2012-10-31 14:34:17 +00:00
|
|
|
$(STRIP) --strip-unneeded $(INSTALL_DIR)/libs/*
|
2013-03-24 14:08:42 +00:00
|
|
|
cp -rpL koreader-base/data/*.css $(INSTALL_DIR)/data
|
|
|
|
cp -rpL koreader-base/fonts $(INSTALL_DIR)
|
2012-12-12 11:12:20 +00:00
|
|
|
rm $(INSTALL_DIR)/fonts/droid/DroidSansFallbackFull.ttf
|
2013-03-24 15:38:27 +00:00
|
|
|
echo $(VERSION) > git-rev
|
|
|
|
cp -r git-rev resources $(INSTALL_DIR)
|
2012-08-25 14:52:12 +00:00
|
|
|
cp -rpL frontend $(INSTALL_DIR)
|
2012-04-09 17:32:08 +00:00
|
|
|
mkdir $(INSTALL_DIR)/fonts/host
|
2013-03-24 15:52:39 +00:00
|
|
|
zip -9 -r koreader-$(VERSION).zip $(INSTALL_DIR) launchpad/ extensions/
|
2012-10-02 21:18:28 +00:00
|
|
|
rm -rf $(INSTALL_DIR)
|
2013-03-24 15:52:39 +00:00
|
|
|
@echo "copy koreader-$(VERSION).zip to /mnt/us/customupdates and install with shift+shift+I"
|