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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
|
Description: Debian-specific build files.
Forwarded: not-needed
Author: Filip Strömbäck <filip@fprg.se>
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,71 @@
+# DESTDIR is the destination directory
+
+# Where to locate shared Storm files.
+STORM_SHARED := $(DESTDIR)/usr/lib/storm
+
+# Where to store documentation.
+STORM_DOC := $(DESTDIR)/usr/share/doc/storm-lang
+
+# To have a local .mymake configuration file
+export HOME = $(shell pwd)/debian
+MM := mymake -d INFO
+
+MM_CONFIG := dist nostatic nobacktrace
+
+CLEAN_DIRS = $(basename $(wildcard */.mymake))
+
+.PHONY: all install
+all:
+ rm -f debian/.mymake
+ echo $(or $(patsubst -j%,%,$(filter -j%,$(MAKEFLAGS))),"1") | $(MM) --config > /dev/null
+
+ 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)
+ cp -r root/markdown $(STORM_SHARED)
+ cp -r root/tutorials $(STORM_SHARED)
+ bash ./compile_doc.sh $(STORM_DOC)/html
+ find $(STORM_SHARED) -name "*.xcf" -exec rm \{\} \;
+ find $(STORM_DOC) -name "*.xcf" -exec rm \{\} \;
+ bash ./install_icons.sh $(DESTDIR)
+
+clean:
+ rm -rf release/ Gc/release_mps/ $(addsuffix release/,$(CLEAN_DIRS))
+ for i in $(filter-out Core/%,$(CLEAN_DIRS)); do \
+ if [ -f $${i}Gen/.gitignore ]; then \
+ rm -f $${i}Gen/*; \
+ else \
+ rm -rf $${i}Gen/; \
+ fi \
+ done
+ rm -f root/doc
+ find root/ -name '*_doc' -print0 | xargs -0 rm -f
+ find root/ -name '*.so' -print0 | xargs -0 rm -f
+
--- /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
@@ -185,6 +185,11 @@
#We do not need O3
opt=-O2
+#Respect CFLAGS etc.
+flags+=<env:CPPFLAGS> <env:CXXFLAGS>
+cflags+=<env:CPPFLAGS> <env:CFLAGS>
+linkFlags+=<env:LDFLAGS>
+
[pic,unix]
#All libraries need to be compiled with the -fPIC flag. At least on X86-64.
flags+=-fPIC
@@ -242,7 +247,7 @@
ext+=S
noIncludes+=*.s
noIncludes+=*.S
-compile+=*.S:gcc -g <file> <includes> -c -o <output>
+compile+=*.S:gcc <env:CFLAGS> <env:CPPFLAGS> <file> <includes> -c -o <output>
[stormpp]
stormpp=CppTypes
--- /dev/null
+++ b/compile_doc.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+date=$(sed -En 's/--.*<.*> ([^ ].*)/\1/p' debian/changelog | head -n 1)
+date=$(date --utc --date="$date" "+%Y-%m-%d")
+release/Storm_mps -r root -f markdown.doc.generate -- --clear --date=$date Storm storm doc "$1"
|