[packages] Use default templates instead of custom reimplementations where applicable
[packages.git] / libs / libosip2 / Makefile
1 #
2 # Copyright (C) 2006-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:=libosip2
11 PKG_VERSION:=3.1.0
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@GNU/osip
16 PKG_MD5SUM:=7eb305608256ac2a7a27b66ce52627c8
17
18 PKG_FIXUP:=libtool
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/libosip2
24   SECTION:=libs
25   CATEGORY:=Libraries
26   TITLE:=GNU oSIP library
27   URL:=http://www.gnu.org/software/osip/
28   DEPENDS:=+libpthread
29 endef
30
31 define Package/libosip2description
32  GNU oSIP library, a Session Initiation Protocol (SIP) implementation.
33 endef
34
35 TARGET_CFLAGS += $(FPIC)
36
37 define Build/Configure
38         $(call Build/Configure/Default, \
39                 --enable-shared \
40                 --enable-static \
41                 --disable-debug \
42                 --disable-trace \
43                 --enable-pthread \
44                 --enable-semaphore \
45                 --enable-ntimer \
46         )
47 endef
48
49 define Build/InstallDev
50         $(INSTALL_DIR) $(1)/usr/include
51         $(CP) $(PKG_INSTALL_DIR)/usr/include/osip{,parser}2 $(1)/usr/include/
52         $(INSTALL_DIR) $(1)/usr/lib
53         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libosip{,parser}2.{a,so*} $(1)/usr/lib/
54         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
55         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libosip2.pc $(1)/usr/lib/pkgconfig/
56 endef
57
58 define Package/libosip2/install
59         $(INSTALL_DIR) $(1)/usr/lib
60         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libosip{,parser}2.so $(PKG_INSTALL_DIR)/usr/lib/libosip{,parser}2.so.* $(1)/usr/lib/
61 endef
62
63 $(eval $(call BuildPackage,libosip2))