From 1c605fea9478b92959411b6a2b2576c2ba245569 Mon Sep 17 00:00:00 2001 From: Xiangfu Liu Date: Thu, 13 Jan 2011 14:36:18 +0800 Subject: [PATCH] new package: offrss and some depends pakcages --- libmrss/Makefile | 48 +++++++++++++++++++ libnxml/Makefile | 48 +++++++++++++++++++ offrss/Makefile | 43 +++++++++++++++++ offrss/files/feedurls.txt | 15 ++++++ .../001-fix-the-static-gcc-in-Makefile.patch | 13 +++++ 5 files changed, 167 insertions(+) create mode 100644 libmrss/Makefile create mode 100644 libnxml/Makefile create mode 100644 offrss/Makefile create mode 100644 offrss/files/feedurls.txt create mode 100644 offrss/patches/001-fix-the-static-gcc-in-Makefile.patch diff --git a/libmrss/Makefile b/libmrss/Makefile new file mode 100644 index 0000000..4050190 --- /dev/null +++ b/libmrss/Makefile @@ -0,0 +1,48 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=libmrss +PKG_VERSION:=0.19.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.autistici.org/bakunin/$(PKG_NAME)/ +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/libmrss + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Libmrss + URL:=http://www.autistici.org/bakunin/libmrss/doc/ + DEPNEDS:=+libcurl +libnxml +endef + +CONFIGURE_ARGS += --prefix=/usr +TARGET_LDFLAGS += -Wl,-rpath-link -Wl,$(STAGING_DIR)/usr/lib + +define Package/libmrss/description + mRss is a FreeSoftware project released under LGPL 2.0. +endef + +define Build/Compile + rm -rf $(PKG_INSTALL_DIR) + $(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) \ + $(MAKE_FLAGS) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install +endef + +define Build/InstallDev + mkdir -p $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ + mkdir -p $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ +endef + +define Package/libmrss/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmrss.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libmrss)) \ No newline at end of file diff --git a/libnxml/Makefile b/libnxml/Makefile new file mode 100644 index 0000000..45067ca --- /dev/null +++ b/libnxml/Makefile @@ -0,0 +1,48 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=libnxml +PKG_VERSION:=0.18.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.autistici.org/bakunin/$(PKG_NAME)/ +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/libnxml + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Libnxml + URL:=http://www.autistici.org/bakunin/libnxml/doc/ + DEPNEDS:=+libcurl +endef + +CONFIGURE_ARGS += --prefix=/usr +TARGET_LDFLAGS += -Wl,-rpath-link -Wl,$(STAGING_DIR)/usr/lib + +define Package/libnxml/description + nXML is a C library for parsing, writing and creating XML 1.0 and 1.1 files or streams. +endef + +define Build/Compile + rm -rf $(PKG_INSTALL_DIR) + $(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) \ + $(MAKE_FLAGS) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install +endef + +define Build/InstallDev + mkdir -p $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ + mkdir -p $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ +endef + +define Package/libnxml/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnxml.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libnxml)) \ No newline at end of file diff --git a/offrss/Makefile b/offrss/Makefile new file mode 100644 index 0000000..770f621 --- /dev/null +++ b/offrss/Makefile @@ -0,0 +1,43 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=offrss +PKG_VERSION:=trunk +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip +PKG_SOURCE_URL:=http://downloads.qi-hardware.com/software/mirror-openwrt-sources/ +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +UNPACK_CMD=unzip $(DL_DIR)/$(PKG_SOURCE) -d $(1)/../ + +include $(INCLUDE_DIR)/package.mk + +define Package/offrss + SECTION:=network + CATEGORY:=Network + TITLE:=Offrss + URL:=http://vicerveza.homeunix.net/~viric/cgi-bin/offrss/doc/trunk/doc/home.wiki + DEPNEDS:=+libcurl +libnxml +libmrss +endef + +TARGET_CFLAHGS += -I$(STAGING_DIR)/usr/iniclude +TARGET_LDFLAGS += -Wl,-rpath-link -Wl,$(STAGING_DIR)/usr/lib + +define Package/offrss/description + mRss is a C library for parsing, writing and creating RSS/ATOM files or streams. +endef + +define Build/Compile + $(call Build/Compile/Default) +endef + +define Package/offrss/install + # $(INSTALL_DIR) $(1)/usr/bin + # echo -e "\0043\0041/bin/sh\n(cd /usr/share/offrss; ./offrss $$*)" > $(1)/usr/bin/offrss + # chmod +x $(1)/usr/bin/offrss + + $(INSTALL_DIR) $(1)/usr/share/offrss + $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/share/offrss/ + $(CP) ./files/feedurls.txt $(1)/usr/share/offrss/ +endef + +$(eval $(call BuildPackage,offrss)) \ No newline at end of file diff --git a/offrss/files/feedurls.txt b/offrss/files/feedurls.txt new file mode 100644 index 0000000..a787135 --- /dev/null +++ b/offrss/files/feedurls.txt @@ -0,0 +1,15 @@ +# Syntax: +# # A comment +# - Section name +# feedid http://wherever.com/feed/atom + +#- Còmic +#dilbert http://feeds.feedburner.com/DilbertDailyStrip +#ru_nichtlustig http://www.livejournal.com/users/ru_nichtlustig/data/rss + +- Informàtica +lwn http://lwn.net/headlines/newrss +#LOR http://feeds.feedburner.com/org/LOR?format=xml + +- Qi Hardware +Qi_Hardware http://en.qi-hardware.com/feed/rss20.xml diff --git a/offrss/patches/001-fix-the-static-gcc-in-Makefile.patch b/offrss/patches/001-fix-the-static-gcc-in-Makefile.patch new file mode 100644 index 0000000..8c33c04 --- /dev/null +++ b/offrss/patches/001-fix-the-static-gcc-in-Makefile.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index ff2e231..8414bae 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,7 @@ + VERSION=$(shell if test -f manifest.uuid; then cat manifest.uuid | cut -c -10 ; else echo undefined; fi) + + offrss: offrss.c server.c encoding.c util.c +- gcc -DVERSION="$(VERSION)" -g -o $@ $^ -lmrss -lcurl ++ $(CC) $(CFLAGS) $(LDFLAGS) -DVERSION="$(VERSION)" -g -o $@ $^ -lmrss -lcurl + + offrss.c: offrss.h + server.c: offrss.h