Retain symlinks. $(INSTALL_*) copys the contens of a file, so if we want to keep
[packages.git] / Xorg / xorg / lib / libpciaccess / Makefile
1 #
2 # Copyright (C) 2008 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_BASE_NAME:=libpciaccess
11 PKG_NAME:=libpciaccess
12 PKG_RELEASE:=3
13 PKG_VERSION:=0.10.3
14
15 PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.4/src/lib/
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/$(PKG_NAME)-$(PKG_VERSION)/
18 PKG_MD5SUM:=6d5468debf76fac84576ca26c9535821
19 PKG_FIXUP:=libtool
20
21 include $(INCLUDE_DIR)/package.mk
22
23 PKG_INSTALL:=1
24
25 define Package/libpciaccess
26   SECTION:=xorg-libraries
27   CATEGORY:=Xorg
28   SUBMENU:=libraries
29   DEPENDS:=+pciutils
30   TITLE:=libpciaccess
31   URL:=http://xorg.freedesktop.org/
32 endef
33
34 define Build/Configure
35         $(call Build/Configure/Default, \
36                 --with-pciids-path=/usr/share/pci.ids \
37                 , \
38                 ac_cv_file__usr_include_asm_mtrr_h=$(shell \
39                 test -f "$(TOOLCHAIN_DIR)/include/asm/mtrr.h" \
40                         && echo "yes" \
41                         || echo "no") \
42         )
43 endef
44
45 define Build/InstallDev
46         $(INSTALL_DIR) $(1)/usr/include
47         $(INSTALL_DATA) \
48                 $(PKG_INSTALL_DIR)/usr/include/*.h \
49                 $(1)/usr/include
50
51         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
52         $(CP) \
53                 $(PKG_INSTALL_DIR)/usr/lib/libpciaccess.{so*,a,la} \
54                 $(1)/usr/lib/
55
56         $(INSTALL_DATA) \
57                 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
58                 $(1)/usr/lib/pkgconfig/
59 endef
60
61 define Package/libpciaccess/install
62         $(INSTALL_DIR) $(1)/usr/lib
63         $(CP) \
64                 $(PKG_INSTALL_DIR)/usr/lib/libpciaccess.so* \
65                 $(1)/usr/lib/
66 endef
67
68 $(eval $(call BuildPackage,libpciaccess))