aboutsummaryrefslogtreecommitdiff
path: root/devel/scons/Makefile
blob: ae052ba991d10f28fbb86c1250101efeffe75ce7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#
# Copyright (C) 2011-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=scons
PKG_VERSION:=4.0.1
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-local-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/scons
PKG_HASH:=23c9d37a008b525bdedfe2666a28b9466c4c945d8ba379873cfd0b9006a3d618

PKG_MAINTAINER:=
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=scons-LICENSE

PKG_HOST_ONLY:=1
HOST_BUILD_PARALLEL:=1

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk

HOST_UNPACK:=$(DECOMPRESS_CMD) $(HOST_TAR) -C $(HOST_BUILD_DIR) $(TAR_OPTIONS)

define Package/scons
  SECTION:=devel
  CATEGORY:=Development
  TITLE:=scons
  URL:=https://scons.org/
  BUILDONLY:=1
endef

define Package/scons/description
  SCons is an Open Source software construction tool—that is, a
  next-generation build tool. Think of SCons as an improved, cross-platform
  substitute for the classic Make utility with integrated functionality
  similar to autoconf/automake and compiler caches such as ccache. In short,
  SCons is an easier, more reliable and faster way to build software.
endef

define Host/Configure
endef

define Host/Compile
endef

define Host/Install
	$(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
	for py in $(HOST_BUILD_DIR)/*.py; do \
		bin=$$$${py%.py} ; \
		$(CP) $$$$py $$$$bin ; \
		$(SED) '1c#!$(STAGING_DIR_HOST)/bin/python' $$$$bin ; \
		$(INSTALL_BIN) $$$$bin $(STAGING_DIR_HOSTPKG)/bin/ ; \
	done

	$(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/lib/scons
	$(CP) $(HOST_BUILD_DIR)/scons-local-$(PKG_VERSION)/* $(STAGING_DIR_HOSTPKG)/lib/scons/
endef

$(eval $(call BuildPackage,scons))
$(eval $(call HostBuild))