summaryrefslogtreecommitdiffstats
path: root/package/schifra/schifra.mk
diff options
context:
space:
mode:
authorSimon Dawson <spdawson@gmail.com>2012-08-23 23:39:54 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2012-09-10 10:45:19 +0200
commit48a68499d17a730fdf83934f5e9032eb373c596d (patch)
treea2c4e34a9caeea9aaa8c637c03c6f1b3914ddd56 /package/schifra/schifra.mk
parentb9e89b340e27daff98faa430082cbe1a871dfb6f (diff)
downloadbuildroot-novena-48a68499d17a730fdf83934f5e9032eb373c596d.tar.gz
buildroot-novena-48a68499d17a730fdf83934f5e9032eb373c596d.zip
schifra: new package
[Peter: minor fixes/cleanups] Signed-off-by: Simon Dawson <spdawson@gmail.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/schifra/schifra.mk')
-rw-r--r--package/schifra/schifra.mk55
1 files changed, 55 insertions, 0 deletions
diff --git a/package/schifra/schifra.mk b/package/schifra/schifra.mk
new file mode 100644
index 000000000..0285b628a
--- /dev/null
+++ b/package/schifra/schifra.mk
@@ -0,0 +1,55 @@
+#############################################################
+#
+# schifra
+#
+#############################################################
+SCHIFRA_VERSION = 0.0.1
+SCHIFRA_SITE = http://www.schifra.com/downloads
+SCHIFRA_SOURCE = schifra.tgz
+SCHIFRA_INSTALL_STAGING = YES
+SCHIFRA_LICENSE = schifra license
+SCHIFRA_LICENSE_FILES = schifra_license.txt
+
+SCHIFRA_MAKE_OPT = COMPILER="$(TARGET_CXX)" \
+ OPTIONS="$(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o"
+
+# The examples are the only buildable artefacts.
+ifeq ($(BR2_PACKAGE_SCHIFRA_EXAMPLES),y)
+define SCHIFRA_BUILD_CMDS
+ $(MAKE) -C $(@D) $(SCHIFRA_MAKE_OPT) all
+endef
+
+define SCHIFRA_INSTALL_EXAMPLES
+ cd $(@D) && for i in `find -type f -name 'schifra_*' -executable` ; \
+ do \
+ $(INSTALL) -m 0755 -D $$i (TARGET_DIR)/usr/bin/$$i; \
+ done
+endef
+
+SCHIFRA_POST_TARGET_INSTALL_HOOKS += SCHIFRA_INSTALL_EXAMPLES
+endif
+
+define SCHIFRA_INSTALL_TARGET_CMDS
+ cd $(@D) && for i in schifra_*.hpp; do \
+ $(INSTALL) -m 0644 -D $$i $(TARGET_DIR)/usr/include/$$i; done
+endef
+
+define SCHIFRA_INSTALL_STAGING_CMDS
+ cd $(@D) && for i in schifra_*.hpp; do \
+ $(INSTALL) -m 0644 -D $$i $(STAGING_DIR)/usr/include/$$i; done
+endef
+
+define SCHIFRA_UNINSTALL_TARGET_CMDS
+ $(RM) $(TARGET_DIR)/usr/include/schifra_*.hpp
+ $(RM) $(TARGET_DIR)/usr/bin/schifra_*
+endef
+
+define SCHIFRA_UNINSTALL_STAGING_CMDS
+ $(RM) $(STAGING_DIR)/usr/include/schifra_*.hpp
+endef
+
+define SCHIFRA_CLEAN_CMDS
+ $(MAKE) -C $(@D) $(SCHIFRA_MAKE_OPT) clean
+endef
+
+$(eval $(generic-package))