OpenWrt packages
Sign in or create your account | Project List | Help
OpenWrt packages Git Source Tree
Root/
| 1 | # |
| 2 | # Copyright (C) 2010 OpenWrt.org |
| 3 | # |
| 4 | # This is free software, licensed under the GNU General Public License v2. |
| 5 | # See /LICENSE for more information. |
| 6 | # |
| 7 | |
| 8 | include $(TOPDIR)/rules.mk |
| 9 | |
| 10 | PKG_NAME:=dgclock |
| 11 | PKG_VERSION:=091222 |
| 12 | PKG_RELEASE:=1 |
| 13 | |
| 14 | PKG_SOURCE:=dgclock$(PKG_VERSION).zip |
| 15 | PKG_SOURCE_URL:=http://clogging.web.fc2.com/dingoo/ |
| 16 | PKG_MD5SUM:=2a5143b7a3db464488c917387445e092 |
| 17 | PKG_BUILD_DIR:=$(BUILD_DIR)/dgclock-$(PKG_VERSION) |
| 18 | |
| 19 | UNPACK_CMD=unzip -d $(1) $(DL_DIR)/$(PKG_SOURCE) |
| 20 | |
| 21 | include $(INCLUDE_DIR)/package.mk |
| 22 | |
| 23 | TARGET_CFLAGS += \ |
| 24 | -I$(STAGING_DIR)/usr/lib/libintl/include/ \ |
| 25 | -I$(STAGING_DIR)/usr/lib/libiconv/include/ \ |
| 26 | -I$(STAGING_DIR)/usr/include/SDL |
| 27 | |
| 28 | TARGET_LDFLAGS += \ |
| 29 | -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \ |
| 30 | -L$(STAGING_DIR)/usr/lib/libintl/lib/ \ |
| 31 | -L$(STAGING_DIR)/usr/lib/libiconv/lib/ \ |
| 32 | -lSDL -lSDL_ttf |
| 33 | |
| 34 | define Package/dgclock |
| 35 | SECTION:=xorg-apps |
| 36 | CATEGORY:=Xorg |
| 37 | TITLE:=dgclock - sdl based date and time |
| 38 | URL:=http://clogging.web.fc2.com/dingoo/ |
| 39 | DEPENDS:=+libsdl +libsdl-image +libsdl-ttf +dejavu-fonts-ttf |
| 40 | endef |
| 41 | |
| 42 | define Package/dgclock/description |
| 43 | Clock and date in sdl |
| 44 | endef |
| 45 | |
| 46 | define Build/Compile |
| 47 | ( cd $(PKG_BUILD_DIR) ; \ |
| 48 | mkdir bin obj ; \ |
| 49 | $(TARGET_CC) -c $(TARGET_CFLAGS) -o obj/text.o src/text.c ; \ |
| 50 | $(TARGET_CC) -c $(TARGET_CFLAGS) -o obj/settime.o src/settime.c ; \ |
| 51 | $(TARGET_CC) -c $(TARGET_CFLAGS) -o obj/main.o src/main.c ; \ |
| 52 | $(TARGET_CC) -o bin/dgclock obj/text.o obj/main.o obj/settime.o $(TARGET_LDFLAGS) ; \ |
| 53 | ) |
| 54 | endef |
| 55 | |
| 56 | define Package/dgclock/install |
| 57 | $(INSTALL_DIR) \ |
| 58 | $(1)/usr/bin \ |
| 59 | $(1)/usr/share/icons \ |
| 60 | $(1)/usr/share/applications |
| 61 | |
| 62 | $(INSTALL_BIN) \ |
| 63 | $(PKG_BUILD_DIR)/bin/dgclock \ |
| 64 | $(1)/usr/bin/ |
| 65 | |
| 66 | $(INSTALL_DATA) \ |
| 67 | $(PKG_BUILD_DIR)/dgclock/dgclock.png \ |
| 68 | $(1)/usr/share/icons/ |
| 69 | |
| 70 | $(INSTALL_DATA) \ |
| 71 | ./files/dgclock.desktop \ |
| 72 | $(1)/usr/share/applications/ |
| 73 | endef |
| 74 | |
| 75 | $(eval $(call BuildPackage,dgclock)) |
| 76 |
