Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37763896
en ru br
ALT Linux repos
S:2.10.1-alt2

Group :: Development/ML
RPM: mosml

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: mosml-alt-header.patch
Download


# При генерации выполняемых файлов (байткод), mosml записывает расположение
# интерпретатора со стадии install, а нужно со стадии build, т.к. на стадии
# build prefix=/usr, на стадии install - %buildroot/usr.
#
# Отправить patch в upstream.
#
diff -ur mosml-2.10.1.orig/src/launch/Makefile mosml-2.10.1/src/launch/Makefile
--- mosml-2.10.1.orig/src/launch/Makefile	2016-09-03 10:42:41.000000000 -0500
+++ mosml-2.10.1/src/launch/Makefile	2016-09-03 11:16:46.181458986 -0500
@@ -3,12 +3,13 @@
 
 include ../Makefile.inc
 
-all: mosml mosmlc mosmllex camlexec testprog 
-
-# header cannot be generated until camlrunm is installed in $(BINDIR)...
+all: header mosml mosmlc mosmllex camlexec testprog 
 
 install:
-	echo "#!$(BINDIR)/camlrunm" > $(DESTDIR)$(LIBDIR)/header;
+	# header cannot be generated until camlrunm is installed in $(BINDIR)...
+	# but we have to pregenerate it with directories of BUILD phase, since
+	# while packaging (RPM) "make install" runs with fake-root.
+	cp header $(DESTDIR)$(LIBDIR)/header;
 	for script in mosml mosmlc mosmllex; do \
 	  ${INSTALL_SCRIPT} $$script $(DESTDIR)$(BINDIR)/$$script; \
 	  chmod a+x $(DESTDIR)$(BINDIR)/$$script; \
@@ -30,6 +31,8 @@
 	  chmod a+x $(BINDIR)/$$script; \
 	done
 
+header:
+	echo "#!$(BINDIR)/camlrunm" > header
 
 mosml: mosml.tpl
 	sed -e "s|LIBDIR|$(LIBDIR)|" -e "s|BINDIR|$(BINDIR)|" mosml.tpl > mosml
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin