source: trunk/debian/packages/swconfig11/tags/0.0-1~debwrtSID+3/Makefile @ 843

Last change on this file since 843 was 843, checked in by amain, 3 years ago

swconfig11: tag 0.0-1~debwrtSID+3

File size: 1.4 KB
Line 
1#
2# Copyright (C) 2008-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
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=swconfig
11PKG_RELEASE:=11
12
13PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
14PKG_LICENSE:=GPL-2.0
15
16include $(INCLUDE_DIR)/package.mk
17include $(INCLUDE_DIR)/kernel.mk
18
19define Package/swconfig
20  SECTION:=base
21  CATEGORY:=Base system
22  DEPENDS:=+libuci +libnl-tiny
23  TITLE:=Switch configuration utility
24endef
25
26TARGET_CPPFLAGS := \
27        -D_GNU_SOURCE \
28        -I$(STAGING_DIR)/usr/include/libnl-tiny \
29        -I$(PKG_BUILD_DIR) \
30        $(TARGET_CPPFLAGS) \
31        -I$(LINUX_DIR)/user_headers/include
32
33define Build/Prepare
34        mkdir -p $(PKG_BUILD_DIR)
35        $(CP) ./src/* $(PKG_BUILD_DIR)/
36endef
37
38define Build/Compile
39        CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
40        $(MAKE) -C $(PKG_BUILD_DIR) \
41                $(TARGET_CONFIGURE_OPTS) \
42                LIBS="$(TARGET_LDFLAGS) -lnl-tiny -lm -luci"
43endef
44
45define Build/InstallDev
46        $(INSTALL_DIR) $(1)/usr/include
47        $(CP) $(PKG_BUILD_DIR)/swlib.h $(1)/usr/include/
48
49        $(INSTALL_DIR) $(1)/usr/lib
50        $(CP) $(PKG_BUILD_DIR)/libsw.so $(1)/usr/lib/
51endef
52
53define Package/swconfig/install
54        $(INSTALL_DIR) $(1)/sbin $(1)/lib/network
55        $(INSTALL_BIN) $(PKG_BUILD_DIR)/swconfig $(1)/sbin/swconfig
56        $(INSTALL_BIN) $(PKG_BUILD_DIR)/libsw.so $(1)/lib
57        $(INSTALL_DATA) ./files/switch.sh $(1)/lib/network/
58endef
59
60$(eval $(call BuildPackage,swconfig))
Note: See TracBrowser for help on using the repository browser.