Add koreader submodule
This commit is contained in:
parent
67032fb131
commit
4e46cb2a6b
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,3 +1,6 @@
|
|||||||
[submodule "src/linux"]
|
[submodule "src/linux"]
|
||||||
path = src/linux
|
path = src/linux
|
||||||
url = git@github.com:lgeek/linux-okreader.git
|
url = git@github.com:lgeek/linux-okreader.git
|
||||||
|
[submodule "src/koreader"]
|
||||||
|
path = src/koreader
|
||||||
|
url = git@github.com:lgeek/koreader.git
|
||||||
|
21
build.sh
21
build.sh
@ -23,7 +23,7 @@
|
|||||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
available_targets=("linux-image" "linux-modules" "firmware-okreader")
|
available_targets=("linux-image" "linux-modules" "firmware-okreader" "koreader")
|
||||||
|
|
||||||
print_usage() {
|
print_usage() {
|
||||||
echo "Usage: build.sh [TARGET]"
|
echo "Usage: build.sh [TARGET]"
|
||||||
@ -104,6 +104,22 @@ compile_firmware_okreader() {
|
|||||||
cd ..
|
cd ..
|
||||||
}
|
}
|
||||||
|
|
||||||
|
compile_koreader() {
|
||||||
|
cd src/koreader
|
||||||
|
rm *.tar.gz
|
||||||
|
rm *.zip
|
||||||
|
make fetchthirdparty
|
||||||
|
make TARGET=kobo koboupdate
|
||||||
|
cd ..
|
||||||
|
cd koreader-pkg
|
||||||
|
rm -R opt
|
||||||
|
mkdir opt
|
||||||
|
cd opt
|
||||||
|
tar xf ../../koreader/koreader-kobo-arm-linux-gnueabihf*.tar.gz
|
||||||
|
cd ../../
|
||||||
|
dpkg-deb -b koreader-pkg .
|
||||||
|
}
|
||||||
|
|
||||||
targets=()
|
targets=()
|
||||||
parse_args $@
|
parse_args $@
|
||||||
|
|
||||||
@ -118,6 +134,9 @@ for target in ${targets[*]}; do
|
|||||||
firmware-okreader)
|
firmware-okreader)
|
||||||
compile_firmware_okreader
|
compile_firmware_okreader
|
||||||
;;
|
;;
|
||||||
|
koreader)
|
||||||
|
compile_koreader
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
1
src/koreader
Submodule
1
src/koreader
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 58d4c4c975e6ec0feec3accf29623c9c183f193a
|
5
src/koreader-pkg/DEBIAN/control
Normal file
5
src/koreader-pkg/DEBIAN/control
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
Package: koreader
|
||||||
|
Version: 2014.11-3
|
||||||
|
Maintainer: Cosmin Gorgovan <okreader@linux-geek.org>
|
||||||
|
Architecture: armhf
|
||||||
|
Description: An ebook viewer application.
|
3
src/koreader-pkg/DEBIAN/postinst
Executable file
3
src/koreader-pkg/DEBIAN/postinst
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
update-rc.d koreader defaults > /dev/null
|
36
src/koreader-pkg/etc/init.d/koreader
Executable file
36
src/koreader-pkg/etc/init.d/koreader
Executable file
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: koreader
|
||||||
|
# Required-Start:
|
||||||
|
# Required-Stop:
|
||||||
|
# Should-Start:
|
||||||
|
# Default-Start: 1 2 3 4 5
|
||||||
|
# Default-Stop:
|
||||||
|
# Short-Description: Start koreader.
|
||||||
|
# Description: Start koreader.
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||||
|
|
||||||
|
do_start () {
|
||||||
|
cd /opt/koreader
|
||||||
|
./luajit ./reader.lua /mnt/onboard &
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start|"")
|
||||||
|
do_start
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
# No-op
|
||||||
|
;;
|
||||||
|
restart|reload|force-reload|status)
|
||||||
|
echo "Error: argument '$1' not supported" >&2
|
||||||
|
exit 3
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: koreader [start|stop]" >&2
|
||||||
|
exit 3
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
Loading…
Reference in New Issue
Block a user