libtwin: General cleanup of the libtwin package makefile
authorGeoff Levand <geoffrey.levand@am.sony.com>
Wed, 19 Aug 2009 22:34:50 +0000 (22:34 +0000)
committerGeoff Levand <geoffrey.levand@am.sony.com>
Wed, 19 Aug 2009 22:34:50 +0000 (22:34 +0000)
 o Make indenting consistent.
 o Update project URL.
 o Add MAINTAINER.
 o Use EXTRA_CFLAGS instead of TARGET_CFLAGS.
 o Use INSTALL_XXX macros.
 o Use default Build/Configure and Build/Compile targets.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
SVN-Revision: 17323

libs/libtwin/Makefile

index 63a8068..d58dfdb 100644 (file)
@@ -18,49 +18,51 @@ PKG_FIXUP:=libtool
 
 include $(INCLUDE_DIR)/package.mk
 
+PKG_INSTALL=1
+
 define Package/libtwin
-  SECTION:=libs
-  CATEGORY:=Libraries
-  DEPENDS:=+zlib +libpng +libjpeg
-  TITLE:=The tiny windowing system libraries
-  URL:=http://www.t2-project.org/packages/libtwin.html
+       SECTION:=libs
+       CATEGORY:=Libraries
+       DEPENDS:=+zlib +libpng +libjpeg
+       TITLE:=The tiny windowing system library
+       URL:=http://ozlabs.org/~jk/projects/petitboot/
+       MAINTAINER:=Geoff Levand <geoffrey.levand@am.sony.com>
 endef
 
-TARGET_CFLAGS += -flax-vector-conversions
-
-define Build/Configure
-       $(call Build/Configure/Default, \
-               --enable-shared \
-               --enable-static \
-               --disable-x11 \
-       )
+define Package/libtwin/description
+       Keith Packard's Tiny Windowing System Library
 endef
 
-define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               DESTDIR="$(PKG_INSTALL_DIR)" \
-               all install
-endef
+CONFIGURE_ARGS += --enable-shared --enable-static --disable-x11
+
+EXTRA_CFLAGS += -flax-vector-conversions
 
 define Build/InstallDev
-       mkdir -p $(1)/usr/include
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/libtwin $(1)/usr/include/
-       mkdir -p $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtwin.{la,a,so*} $(1)/usr/lib/
-       mkdir -p $(1)/usr/lib/pkgconfig
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtwin.pc $(1)/usr/lib/pkgconfig/
+       $(INSTALL_DIR) $(1)/usr/include/libtwin
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)/usr/include/libtwin/*.h \
+               $(1)/usr/include/libtwin
+
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_BIN) \
+               $(PKG_INSTALL_DIR)/usr/lib/libtwin.{la,a,so*} \
+               $(1)/usr/lib/
+
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtwin.pc \
+               $(1)/usr/lib/pkgconfig/
 endef
 
 define Build/UninstallDev
-       rm -rf \
-               $(STAGING_DIR)/usr/include/libtwin \
-               $(STAGING_DIR)/usr/lib/libtwin.{la,a,so*} \
-               $(STAGING_DIR)/usr/lib/pkgconfig/libtwin.pc
+       rm -rf $(1)/usr/include/libtwin
 endef
 
 define Package/libtwin/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtwin.so* $(1)/usr/lib/
+       $(INSTALL_BIN) \
+               $(PKG_INSTALL_DIR)/usr/lib/libtwin.so* \
+               $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,libtwin))