libamsel: cleanup, fix cflags
[openwrt/svn-archive/archive.git] / libs / libamsel / 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:=libamsel
12 PKG_VERSION:=20040621-cvs
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=ftp://ftp.amselinux.net/source/
17 PKG_MD5SUM:=2077e620047404881a65d39c53c9917e
18 PKG_CAT:=bzcat
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/libamsel
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=The amwall library
29 DESCRIPTION:=\
30 A library for amwall configuration files.
31 URL:=http://amselinux.de/
32 endef
33
34 define Build/Configure
35 endef
36
37 MAKE_FLAGS += \
38 CFLAGS="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)" \
39 LDIR=$(PKG_BUILD_DIR) \
40 PREFIX="$(PKG_INSTALL_DIR)/usr" \
41 all install
42
43 define Build/InstallDev
44 mkdir -p $(STAGING_DIR)/usr/include
45 $(CP) $(PKG_INSTALL_DIR)/usr/include/amsel/compat.h $(STAGING_DIR)/usr/include/
46 mkdir -p $(STAGING_DIR)/usr/include/compat
47 $(CP) $(PKG_INSTALL_DIR)/usr/include/amsel/compat/queue.h $(STAGING_DIR)/usr/include/compat/
48 mkdir -p $(STAGING_DIR)/usr/lib
49 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libamsel.so $(STAGING_DIR)/usr/lib/
50 endef
51
52 define Build/UninstallDev
53 rm -rf \
54 $(STAGING_DIR)/usr/include/compat.h \
55 $(STAGING_DIR)/usr/include/compat \
56 $(STAGING_DIR)/usr/lib/libamsel.so
57 endef
58
59 define Package/libamsel/install
60 $(INSTALL_DIR) $(1)/usr/lib
61 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib
62 endef
63
64 $(eval $(call BuildPackage,libamsel))