Makefile 3.0 KB

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