this library is useful for hacked picframe displays. you can use this lib also with lcd4linux. check http://picframe.spritesserver.nl/wiki for more information.

Signed-off-by: Michael Vogt <michu at neophob.com>
Index: st2205tool/patches/120-setpic-makefile.patch
===================================================================
--- st2205tool/patches/120-setpic-makefile.patch	(revision 0)
+++ st2205tool/patches/120-setpic-makefile.patch	(revision 0)
@@ -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
Index: st2205tool/patches/100-base-makefile.patch
===================================================================
--- st2205tool/patches/100-base-makefile.patch	(revision 0)
+++ st2205tool/patches/100-base-makefile.patch	(revision 0)
@@ -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
Index: st2205tool/patches/110-libst-makefile.patch
===================================================================
--- st2205tool/patches/110-libst-makefile.patch	(revision 0)
+++ st2205tool/patches/110-libst-makefile.patch	(revision 0)
@@ -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
Index: st2205tool/Makefile
===================================================================
--- st2205tool/Makefile	(revision 0)
+++ st2205tool/Makefile	(revision 0)
@@ -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))
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to