this library is useful for hacked picframe displays. you can use this lib also with lcd4linux. Signed-off-by: Michael Vogt <michu at neophob.com>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@11068 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
thepeople 2008-05-08 01:17:42 +00:00
parent 5f949beb95
commit 067c525db2
4 changed files with 138 additions and 0 deletions

58
libs/st2205tool/Makefile Normal file
View File

@ -0,0 +1,58 @@
#
# Copyright (C) 2008 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id:
include $(TOPDIR)/rules.mk
PKG_NAME:=st2205tool
PKG_VERSION:=1.4pre1
PKG_RELEASE:=1
PKG_SOURCE:=st2205tool-v$(PKG_VERSION).tgz
PKG_SOURCE_URL:=http://spritesmods.com/picframe/
PKG_MD5SUM:=bf602227bce9c4365e5ae5e9b383d8d9
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/st2205tool
SECTION:=libs
CATEGORY:=Libraries
TITLE:=ST220xu powered photo-frames library
DEPENDS:=libgd
URL:=http://picframe.spritesserver.nl/wiki/
endef
define Package/st2205tool/description
Library for hacked photo-frames based on st220xu chipset. You may use those photo-frames with
mplayer or LCD4Linux
endef
MAKE_FLAGS += \
CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/libst2205/" \
LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
SETPICLIBS="-L$(STAGING_DIR)/usr/lib -lgd -ljpeg -lpng -lz -L../libst2205 -lst2205" \
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_BUILD_DIR)/libst2205/st2205.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libst2205/libst2205.{a,so*} $(1)/usr/lib/
endef
define Package/st2205tool/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/{bgrep,phack,splice,hackfw.sh} $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/setpic/setpic $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libst2205/libst2205.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,st2205tool))

View File

@ -0,0 +1,37 @@
--- st2205tool/Makefile.orig 2008-01-22 00:43:38.000000000 +0100
+++ st2205tool/Makefile 2008-04-22 16:01:46.000000000 +0200
@@ -6,26 +6,26 @@
all: libst2205/libst2205.so setpic/setpic phack splice bgrep
install: all
- make -C libst2205 install
+ $(MAKE) -C libst2205 install
libst2205/libst2205.so:
- make -C libst2205
+ $(MAKE) -C libst2205
setpic/setpic:
- make -C setpic
+ $(MAKE) -C setpic
phack: $(OBJ) $(SRC)
- gcc -o $(@) $(OBJ) $(LIBS) $(FLAGS)
+ $(GCC) -o $(@) $(OBJ) $(LIBS) $(FLAGS)
splice: splice.o splice.c
- gcc -o splice splice.o
+ $(GCC) -o splice splice.o
bgrep: bgrep.o bgrep.c
- gcc -o bgrep bgrep.o
+ $(GCC) -o bgrep bgrep.o
clean:
- make -C libst2205 clean
- make -C setpic clean
+ $(MAKE) -C libst2205 clean
+ $(MAKE) -C setpic clean
rm -f $(OBJ) phack splice splice.o bgrep bgrep.o
distclean: clean

View File

@ -0,0 +1,25 @@
--- st2205tool/libst2205/Makefile.orig 2008-01-20 20:22:32.000000000 +0100
+++ st2205tool/libst2205/Makefile 2008-04-21 07:36:56.000000000 +0200
@@ -6,15 +6,15 @@
all: libst2205.so
libst2205.so: $(OBJ) $(SRC)
- ar -rv libst2205.a $(OBJ)
- gcc -shared -Wl,-soname,libst2205.so.1 -o libst2205.so $(OBJ) $(LIBS)
+ $(AR) -rv libst2205.a $(OBJ)
+ $(GCC) -shared -Wl,-soname,libst2205.so -o libst2205.so $(OBJ) $(LIBS)
clean:
rm -f $(OBJ) test *.a *.so
install: libst2205.so
- test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
- test -z "/usr/local/include" || /bin/mkdir -p "/usr/local/include"
- install libst2205.so /usr/local/lib
- install st2205.h /usr/local/include
- ldconfig
+# test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
+# test -z "/usr/local/include" || /bin/mkdir -p "/usr/local/include"
+# install libst2205.so /usr/local/lib
+# install st2205.h /usr/local/include
+# ldconfig

View File

@ -0,0 +1,18 @@
--- st2205tool/setpic/Makefile.orig 2008-01-20 19:50:11.000000000 +0100
+++ st2205tool/setpic/Makefile 2008-04-22 16:06:40.000000000 +0200
@@ -1,12 +1,12 @@
SRC = main.c
OBJ = main.o
-CFLAGS = -g -Wall -I../libst2205
-LIBS = -lgd -L../libst2205 -lst2205
+#CFLAGS = -g -Wall -I./../libst2205
+#LIBS = -lgd -lst2205
all: setpic
setpic: $(OBJ) $(SRC)
- gcc -o $(@) $(OBJ) $(LIBS) $(FLAGS)
+ $(GCC) -o $(@) $(OBJ) $(SETPICLIBS) $(CFLAGS)
clean:
rm -f $(OBJ) setpic