TinyScheme: Adds options to install library files
[librecmc/package-feed.git] / lang / tinyscheme / Makefile
1 # The software `TinyScheme` was packaged for OpenWRT and LibreCMC by
2 # Christopher Howard <christopher.howard@qlfiles.net> in May 2018.
3
4 # This package configuration file is licensed under the GPL-3+.
5
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19 # The upstream author of `TinyScheme` is Dimitrios Souflis
20 # <dsouflis@acm.org>
21
22 include $(TOPDIR)/rules.mk
23
24 PKG_NAME:=tinyscheme
25 PKG_VERSION:=1.41
26 PKG_RELEASE:=1
27
28 PKG_BUILD_DIR:=$(BUILD_DIR)/tinyscheme-$(PKG_VERSION)
29 PKG_SOURCE:=tinyscheme-$(PKG_VERSION).tar.gz
30 PKG_SOURCE_URL:=ftp://lavender.qlfiles.net/tinyscheme/
31 PKG_HASH:=eac0103494c755192b9e8f10454d9f98f2bbd4d352e046f7b253439a3f991999
32 PKG_CAT:=zcat
33 PKG_LICENSE:=BSD-3-Clause
34 PKG_LICENSE_FILES:=COPYING
35
36 include $(INCLUDE_DIR)/package.mk
37
38 define Package/tinyscheme
39         SECTION:=lang
40         CATEGORY:=Languages
41         TITLE:=TinyScheme programming language
42         URL:=http://tinyscheme.sourceforge.net
43         MAINTAINER=Christopher Howard <christopher.howard@qlfiles.net>
44 endef
45
46 define Package/tinyscheme/config
47         source "$(SOURCE)/Config.in"
48 endef
49
50 define Package/tinyscheme/description
51 TinyScheme is a lightweight Scheme interpreter that implements as large
52 a subset of R5RS as was possible without getting very large and complicated.
53 endef
54
55 define Build/Compile
56         $(call Build/Compile/Default,PLATFORM_FEATURES='-fPIC -DInitFile="\"/usr/lib/tinyscheme/init.scm\""')
57 endef
58
59 define Package/tinyscheme/install
60         $(INSTALL_DIR) $(1)/usr/bin
61         $(INSTALL_BIN) $(PKG_BUILD_DIR)/scheme $(1)/usr/bin/tinyscheme
62         $(INSTALL_DIR) $(1)/usr/lib
63 ifeq ($(CONFIG_TINYSCHEME_SHARED_LIB),y)
64         $(INSTALL_DATA) $(PKG_BUILD_DIR)/libtinyscheme.so $(1)/usr/lib/libtinyscheme.so
65 endif
66 ifeq ($(CONFIG_TINYSCHEME_AR_LIB),y)
67         $(INSTALL_DATA) $(PKG_BUILD_DIR)/libtinyscheme.a $(1)/usr/lib/libtinyscheme.a
68 endif
69         $(INSTALL_DIR) $(1)/usr/lib/tinyscheme
70         $(INSTALL_DATA) $(PKG_BUILD_DIR)/init.scm $(1)/usr/lib/tinyscheme/init.scm
71 endef
72
73 $(eval $(call BuildPackage,tinyscheme))