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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
|
Debian build files.
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,49 @@
+# DESTDIR is the destination directory
+
+# Where to locate shared Storm files.
+STORM_SHARED := $(DESTDIR)/usr/lib/storm
+
+# To have a local .mymake configuration file
+export HOME = $(shell pwd)/debian
+MM := mymake
+
+MM_CONFIG := dist nostatic nobacktrace
+
+.PHONY: all install
+all:
+ rm -f debian/.mymake
+ echo $(or $(patsubst -j%,%,$(filter -j%,$(MAKEFLAGS))),"1") | $(MM) --config > /dev/null
+ echo "[]\nrootdir=$$(pwd)/\ntriplet=${DEB_TARGET_MULTIARCH}" >> .myproject
+
+ bash ./update_version.sh
+
+ $(MM) release $(MM_CONFIG) mps Main
+ $(MM) release $(MM_CONFIG) Gui noskia nocairogl
+ $(MM) release $(MM_CONFIG) Crypto
+ $(MM) release $(MM_CONFIG) Graphics
+ $(MM) release $(MM_CONFIG) Sound
+ $(MM) release $(MM_CONFIG) SQL
+
+
+install:
+ mkdir -p $(DESTDIR)/usr/bin
+ cp release/Storm_mps $(DESTDIR)/usr/bin/storm
+ chmod +x $(DESTDIR)/usr/bin/storm
+ cp scripts/progvis $(DESTDIR)/usr/bin
+ chmod +x $(DESTDIR)/usr/bin/progvis
+ mkdir -p $(STORM_SHARED)
+ cp -r root/doc $(STORM_SHARED)
+ cp -r root/lang $(STORM_SHARED)
+ cp -r root/layout $(STORM_SHARED)
+ cp -r root/crypto $(STORM_SHARED)
+ cp -r root/graphics $(STORM_SHARED)
+ cp -r root/sound $(STORM_SHARED)
+ cp -r root/parser $(STORM_SHARED)
+ cp -r root/presentation $(STORM_SHARED)
+ cp -r root/progvis $(STORM_SHARED)
+ cp -r root/sql $(STORM_SHARED)
+ cp -r root/test $(STORM_SHARED)
+ cp -r root/ui $(STORM_SHARED)
+ cp -r root/util $(STORM_SHARED)
+ bash ./install_icons.sh $(DESTDIR)
+
--- /dev/null
+++ b/scripts/progvis
@@ -0,0 +1,2 @@
+#!/bin/bash
+exec storm -f progvis.main
--- /dev/null
+++ b/update_version.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+(echo "core.info"; sed -En 's/^.*\(([0-9.\-]*)\).*$/\1+debian/p' debian/changelog | head -n 1) > Compiler/COMPILER.version
+
--- a/Gui/.mymake
+++ b/Gui/.mymake
@@ -53,6 +53,6 @@
library+=dl
# Defaults
-flags+=`pkg-config --cflags gtk+-3.0 x11 fontconfig`
-linkFlags+=`pkg-config --libs gtk+-3.0 x11 fontconfig pangoft2` -lGL -lEGL
+flags+=`pkg-config --cflags gtk+-3.0 x11`
+linkFlags+=-lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0 -lX11 -lGL
--- /dev/null
+++ b/install_icons.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+for file in res/*.png
+do
+ dest="$1/usr/share/icons/hicolor/"$(echo "$file" | sed -E 's|res/([a-z]+)-([0-9x]*)\.png|\2/apps/org.storm_lang.\1.png|')
+ mkdir -p $(dirname "$dest")
+ cp "$file" "$dest"
+done
--- a/res/org.storm_lang.progvis.desktop
+++ b/res/org.storm_lang.progvis.desktop
@@ -6,4 +6,4 @@
Terminal=false
Categories=Education
Exec=/usr/bin/progvis
-Icon=progvis
+Icon=org.storm_lang.progvis
--- a/.myproject
+++ b/.myproject
@@ -167,6 +167,10 @@
#We do not need O3
opt=-O2
+#Generate debug information, it is stripped later.
+flags+=-g
+cflags+=-g
+
[pic,unix]
#All libraries need to be compiled with the -fPIC flag. At least on X86-64.
flags+=-fPIC
@@ -217,7 +221,8 @@
ext+=S
noIncludes+=*.s
noIncludes+=*.S
-compile+=*.S:gcc -g <file> <includes> -c -o <output>
+# Note: The -ffile-prefix-map does not work for asm files.
+compile+=*.S:gcc -fdebug-prefix-map=<rootdir>=. <file> <includes> -c -o <output>
[stormpp]
stormpp=CppTypes
@@ -272,3 +277,8 @@
[unix]
compile+=*.c:gcc -Wno-unknown-pragmas -Wno-pragmas -std=c99 -O3 <cflags> <defines> <warnings> -Wno-maybe-uninitialized <file> -c <includes> -o <output>
+
+# Don't use absolute paths, that makes the build not reproducible through the __FILE__ macro among other things.
+absolutePath=no
+flags+=-ffile-prefix-map=<rootdir>=.
+cflags+=-ffile-prefix-map=<rootdir>=.
|