81246d4da574179b687b50e9c1f8868ccac3266a
[openwrt/svn-archive/archive.git] / libs / id3lib / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=id3lib
12 PKG_VERSION:=3.8.3
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/id3lib
17 PKG_MD5SUM:=19f27ddd2dda4b2d26a559a4f0f402a7
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/id3lib
26 SECTION:=libs
27 CATEGORY:=Libraries
28 DEPENDS:=+zlib +uclibcxx
29 TITLE:=An ID3v1/ID3v2 tag manipulation library
30 URL:=http://www.id3lib.org/
31 endef
32
33 # commas are interpreted by the $(call ...) macro, so define a intermediate variable holding our settings
34 PKG_CONFIGURE_LIBS:=-Wl,-Bdynamic,-luClibc++,-Bstatic,-lstdc++,-Bdynamic,-lz,-lm,-lc
35
36 define Build/Configure
37 $(call Build/Configure/Default, \
38 --enable-shared \
39 --enable-static \
40 , \
41 CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti" \
42 LIBS="$(PKG_CONFIGURE_LIBS)" \
43 )
44 endef
45
46 define Build/Compile
47 $(MAKE) -C $(PKG_BUILD_DIR) \
48 DESTDIR="$(PKG_INSTALL_DIR)" \
49 all install
50 endef
51
52 define Build/InstallDev
53 mkdir -p $(STAGING_DIR)/usr/include
54 $(CP) $(PKG_INSTALL_DIR)/usr/include/id3 $(STAGING_DIR)/usr/include/
55 $(CP) $(PKG_INSTALL_DIR)/usr/include/id3.h $(STAGING_DIR)/usr/include/
56 mkdir -p $(STAGING_DIR)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3.{a,so} $(STAGING_DIR)/usr/lib/
58 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3-*.so.* $(STAGING_DIR)/usr/lib/
59 endef
60
61 define Build/UninstallDev
62 rm -rf \
63 $(STAGING_DIR)/usr/include/id3 \
64 $(STAGING_DIR)/usr/include/id3.h \
65 $(STAGING_DIR)/usr/lib/libid3.{a,so} \
66 $(STAGING_DIR)/usr/lib/libid3-*.so.*
67 endef
68
69 define Package/id3lib/install
70 install -d -m0755 $(1)/usr/lib/
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3-*.so.* $(1)/usr/lib/
72 endef
73
74 $(eval $(call BuildPackage,id3lib))