-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
42 lines (36 loc) · 1.75 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
NAME = $(shell cat ./control/control | grep Package | cut -d" " -f2)
ARCH = $(shell cat ./control/control | grep Architecture | cut -d" " -f2)
VERSION = $(shell cat ./control/control | grep Version | cut -d" " -f2)
IPK_NAME = "${NAME}_${VERSION}_${ARCH}.ipk"
render:
ffmpeg -i "./images/splashscreen.png" -vf "scale=1440:810,pad=w=1536:h=810:x=0:y=0:color=black" -pix_fmt nv12 "./images/splashscreen.yuv"
ffmpeg -i "./images/screensaver01.png" -vf "scale=1440:810" -pix_fmt bgra "./images/screensaver01.rgb"
ffmpeg -i "./images/screensaver02.png" -vf "scale=1440:810" -pix_fmt bgra "./images/screensaver02.rgb"
mv ./images/splashscreen.yuv ./data/opt/share/image-changer/splashscreen.yuv
mv ./images/screensaver01.rgb ./data/opt/share/image-changer/screensaver01.data
mv ./images/screensaver02.rgb ./data/opt/share/image-changer/screensaver02.data
all: render
cd ./jni && ndk-build
cp ./libs/armeabi-v7a/draw_to_splash ./data/opt/bin
cp ./libs/armeabi-v7a/draw_to_screensaver ./data/opt/bin
chmod +x ./control/postinst
chmod +x ./control/prerm
chmod +x ./data/opt/bin/draw_to_splash
chmod +x ./data/opt/bin/draw_to_screensaver
chmod +x ./data/opt/bin/image-changer.sh
mkdir -p ipk
echo "2.0" > ipk/debian-binary
cp -r data ipk/
cp -r control ipk/
cd ipk/control && tar --owner=0 --group=0 -czvf ../control.tar.gz .
cd ipk/data && tar --owner=0 --group=0 -czvf ../data.tar.gz .
cd ipk/ && tar --owner=0 --group=0 -czvf "./${IPK_NAME}" ./control.tar.gz ./data.tar.gz ./debian-binary
clean:
rm ./data/opt/share/image-changer/splashscreen.yuv
rm ./data/opt/share/image-changer/screensaver01.data
rm ./data/opt/share/image-changer/screensaver02.data
rm -rf ./data/opt/bin/draw_to_splash
rm -rf ./data/opt/bin/draw_to_screensaver
rm -rf ipk
rm -rf libs
rm -rf obj