add libtool fixes, cleanup
[openwrt/svn-archive/archive.git] / libs / libosip2 / Makefile
1 #
2 # Copyright (C) 2006,2007 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:=libosip2
12 PKG_VERSION:=2.2.0
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@GNU/osip
17 PKG_MD5SUM:=f1237af0250c59b318bd64a59f5750ea
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libosip2
22 SECTION:=libs
23 CATEGORY:=Libraries
24 TITLE:=GNU oSIP library
25 URL:=http://www.gnu.org/software/osip/
26 DEPENDS:=+libpthread
27 endef
28
29 define Package/libosip2description
30 GNU oSIP library, a Session Initiation Protocol (SIP) implementation.
31 endef
32
33 CONFIGURE_ARGS+= \
34 --enable-shared \
35 --enable-static \
36 --disable-debug \
37 --disable-trace \
38 --enable-pthread \
39 --enable-semaphore \
40 --enable-ntimer \
41
42 define Build/Configure
43 $(call Build/Configure/Default)
44 $(call libtool_disable_rpath)
45 endef
46
47 define Build/Compile
48 $(MAKE) -C $(PKG_BUILD_DIR) all
49 $(call libtool_fixup_libdir,$(PKG_INSTALL_DIR))
50 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
51 endef
52
53 define Build/InstallDev
54 mkdir -p $(STAGING_DIR)/usr/include
55 $(CP) $(PKG_INSTALL_DIR)/usr/include/osip{,parser}2 $(STAGING_DIR)/usr/include/
56 mkdir -p $(STAGING_DIR)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libosip{,parser}2.{a,so*} $(STAGING_DIR)/usr/lib/
58 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libosip2.pc $(STAGING_DIR)/usr/lib/pkgconfig/
60 endef
61
62 define Build/UninstallDev
63 rm -rf $(STAGING_DIR)/usr/include/osip{,parser}2 \
64 $(STAGING_DIR)/usr/lib/libosip{,parser}2.{a,so*} \
65 $(STAGING_DIR)/usr/lib/pkgconfig/libosip2.pc
66 endef
67
68 define Package/libosip2/install
69 $(INSTALL_DIR) $(1)/usr/lib
70 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libosip{,parser}2.so.* $(1)/usr/lib/
71 endef
72
73 $(eval $(call BuildPackage,libosip2))