Skip to content

Commit

Permalink
Makefile.in: add extra-install-apport target
Browse files Browse the repository at this point in the history
  • Loading branch information
tomodachi94 committed Sep 4, 2024
1 parent 6aab37d commit 383328d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ install-bin: craftos $(filter fixup-liblua-path,$(MAKECMDGOALS))
echo " [CP] craftos"
cp craftos "$(DESTDIR)$(BINDIR)/craftos"


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

# Not installed by default, since this is not always wanted.
extra-install-apport:
echo " [MKDIR] $(SHAREDIR)/apport/package-hooks"
mkdir -p "$(SHAREDIR)/apport/package-hooks"
echo " [CP] apport/apport_hook.py"
cp apport/apport_hook.py $(SHAREDIR)/apport/package-hooks/craftos-pc.py
cp apport/apport_hook.py $(SHAREDIR)/apport/package-hooks/source_craftos-pc.py
echo " [MKDIR] $(SYSCONFDIR)/apport/crashdb.conf.d"
mkdir -p "$(SHAREDIR)/apport/crashdb.conf.d"
echo " [CP] apport/apport_crashdb.conf"
cp apport/apport_crashdb.conf $(SYSCONFDIR)/apport/crashdb.conf.d/craftos_pc-crashdb.conf

uninstall:
echo " [RM] $(DESTDIR)$(BINDIR)/craftos"
rm -f "$(DESTDIR)$(BINDIR)/craftos"
Expand All @@ -237,5 +250,5 @@ uninstall:
test: craftos
./craftos --headless --script $(shell pwd)/resources/CraftOSTest.lua -d "$(shell mktemp -d)"

.PHONY: all macapp clean rebuild install install-bin install-headers install-liblua install-linux install-darwin extra-install-linux-plugin uninstall test
.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
.SILENT:
5 changes: 5 additions & 0 deletions apport/apport_crashdb.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
craftos_pc = {
'impl': 'launchpad',
'project': 'craftos-pc',
'bug_pattern_base': None,
}
6 changes: 6 additions & 0 deletions apport/apport_hook.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from apport.hookutils import *
import apport.packaging

def add_info(report, ui):
if not apport.packaging.is_distro_package(report['Package'].split()[0]):
report['CrashDB'] = 'craftos_pc'

0 comments on commit 383328d

Please sign in to comment.