Skip to content

Commit 1804909

Browse files
committed
Makefile.in: add extra-install-apport target
1 parent dd87c3f commit 1804909

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

Makefile.in

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ install-bin: craftos $(filter fixup-liblua-path,$(MAKECMDGOALS))
203203
echo " [CP] craftos"
204204
cp craftos "$(DESTDIR)$(BINDIR)/craftos"
205205

206+
206207
# craftos2-lua does have a ``make install`` rule, but it installs a lot of
207208
# files that conflict with a standard Lua installation.
208209
install-liblua: craftos2-lua/src/liblua$(LIBEXT)
@@ -220,6 +221,18 @@ extra-install-linux-plugin: linux-plugin fixup-liblua-path
220221
echo " [CP] ccemux$(LIBEXT)"
221222
cp "ccemux$(LIBEXT)" "$(DESTDIR)$(SHAREDIR)/craftos/plugins"
222223

224+
# Not installed by default, since this is not always wanted.
225+
extra-install-apport:
226+
echo " [MKDIR] $(SHAREDIR)/apport/package-hooks"
227+
mkdir -p "$(SHAREDIR)/apport/package-hooks"
228+
echo " [CP] apport/apport_hook.py"
229+
cp apport/apport_hook.py $(SHAREDIR)/apport/package-hooks/craftos-pc.py
230+
cp apport/apport_hook.py $(SHAREDIR)/apport/package-hooks/source_craftos-pc.py
231+
echo " [MKDIR] $(SYSCONFDIR)/apport/crashdb.conf.d"
232+
mkdir -p "$(SHAREDIR)/apport/crashdb.conf.d"
233+
echo " [CP] apport/apport_crashdb.conf"
234+
cp apport/apport_crashdb.conf $(SYSCONFDIR)/apport/crashdb.conf.d/craftos_pc-crashdb.conf
235+
223236
uninstall:
224237
echo " [RM] $(DESTDIR)$(BINDIR)/craftos"
225238
rm -f "$(DESTDIR)$(BINDIR)/craftos"
@@ -238,5 +251,5 @@ uninstall:
238251
test: craftos
239252
./craftos --headless --script $(shell pwd)/resources/CraftOSTest.lua -d "$(shell mktemp -d)"
240253

241-
.PHONY: all macapp clean rebuild install install-bin install-headers install-liblua install-linux install-darwin extra-install-linux-plugin uninstall test
254+
.PHONY: all macapp clean rebuild install install-bin install-headers install-liblua install-linux install-darwin extra-install-linux-plugin extra-install-apport uninstall test
242255
.SILENT:

apport/apport_crashdb.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
craftos_pc = {
2+
'impl': 'launchpad',
3+
'project': 'craftos-pc',
4+
'bug_pattern_base': None,
5+
}

apport/apport_hook.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from apport.hookutils import *
2+
import apport.packaging
3+
4+
def add_info(report, ui):
5+
if not apport.packaging.is_distro_package(report['Package'].split()[0]):
6+
report['CrashDB'] = 'craftos_pc'

0 commit comments

Comments
 (0)