Register default mods during installation on Debian/Ubuntu.
This commit is contained in:
8
packaging/linux/deb/DEBIAN/postinst
Executable file
8
packaging/linux/deb/DEBIAN/postinst
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Register default mods for in-game switching
|
||||
mkdir -p "{SYSTEMSUPPORTDIR}/ModMetadata"
|
||||
mono {LIBDIR}/OpenRA.Utility.exe ra --register-mod /usr/games/openra-ra system
|
||||
mono {LIBDIR}/OpenRA.Utility.exe cnc --register-mod /usr/games/openra-cnc system
|
||||
mono {LIBDIR}/OpenRA.Utility.exe d2k --register-mod /usr/games/openra-d2k system
|
||||
6
packaging/linux/deb/DEBIAN/prerm
Executable file
6
packaging/linux/deb/DEBIAN/prerm
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
mono {LIBDIR}/OpenRA.Utility.exe ra --unregister-mod system
|
||||
mono {LIBDIR}/OpenRA.Utility.exe cnc --unregister-mod system
|
||||
mono {LIBDIR}/OpenRA.Utility.exe d2k --unregister-mod system
|
||||
@@ -21,6 +21,7 @@ DEB_BUILD_ROOT="$(pwd)/build"
|
||||
|
||||
LIBDIR=/usr/lib/openra
|
||||
DOCDIR=/usr/share/doc/openra
|
||||
SYSTEMSUPPORTDIR=/var/games/openra
|
||||
LINTIANORDIR=/usr/share/lintian/overrides
|
||||
E_BADARGS=85
|
||||
|
||||
@@ -80,6 +81,9 @@ else
|
||||
fi
|
||||
|
||||
sed "s/{VERSION}/${VERSION}/" DEBIAN/control | sed "s/{SIZE}/${PACKAGE_SIZE}/" > "${DEB_BUILD_ROOT}/DEBIAN/control"
|
||||
sed "s|{LIBDIR}|${LIBDIR}|g" DEBIAN/postinst | sed "s|{SYSTEMSUPPORTDIR}|${SYSTEMSUPPORTDIR}|g" > "${DEB_BUILD_ROOT}/DEBIAN/postinst"
|
||||
sed "s|{LIBDIR}|${LIBDIR}|g" DEBIAN/prerm | sed "s|{SYSTEMSUPPORTDIR}|${SYSTEMSUPPORTDIR}|g" > "${DEB_BUILD_ROOT}/DEBIAN/prerm"
|
||||
chmod 0755 "${DEB_BUILD_ROOT}/DEBIAN/postinst" "${DEB_BUILD_ROOT}/DEBIAN/prerm"
|
||||
|
||||
# Build it in the temp directory, but place the finished deb in our starting directory
|
||||
pushd "${DEB_BUILD_ROOT}" >/dev/null
|
||||
|
||||
Reference in New Issue
Block a user