Merge pull request #12524 from paulvt/deb-packaging-lintian-clean

Debian packaging lintian clean
This commit is contained in:
Paul Chote
2017-01-23 18:20:10 +00:00
committed by GitHub
3 changed files with 24 additions and 6 deletions

View File

@@ -7,12 +7,12 @@ Depends: libopenal1, mono-runtime (>= 3.2), libmono-system-core4.0-cil, libmono-
Section: games Section: games
Priority: extra Priority: extra
Homepage: http://www.openra.net/ Homepage: http://www.openra.net/
Description: A multiplayer re-envisioning of early RTS games by Westwood Studios Description: Multiplayer re-envisioning of early RTS games by Westwood Studios
.
OpenRA is a Libre/Free Real Time Strategy game engine supporting early OpenRA is a Libre/Free Real Time Strategy game engine supporting early
Westwood games like Command & Conquer and Command & Conquer: Red Alert. Westwood games like Command & Conquer and Command & Conquer: Red Alert.
The engine is designed from the ground up to be extremely moddable and The engine is designed from the ground up to be extremely moddable and
natively supports user-created maps and mods. natively supports user-created maps and mods.
.
Support can be obtained from our IRC channel (#openra on irc.freenode.net), Support can be obtained from our IRC channel (#openra on irc.freenode.net),
our forum (http://www.sleipnirstuff.com/forum/viewforum.php?f=80), and our our forum (http://www.sleipnirstuff.com/forum/viewforum.php?f=80), and our
bug tracker (http://bugs.openra.net). bug tracker (http://bugs.openra.net).

View File

@@ -6,6 +6,7 @@ DEB_BUILD_ROOT=./root
LIBDIR=/usr/lib/openra LIBDIR=/usr/lib/openra
DOCDIR=/usr/share/doc/openra DOCDIR=/usr/share/doc/openra
LINTIANORDIR=/usr/share/lintian/overrides
E_BADARGS=85 E_BADARGS=85
if [ $# -ne "3" ] if [ $# -ne "3" ]
@@ -22,12 +23,17 @@ mkdir "${DEB_BUILD_ROOT}"
cp -R DEBIAN "${DEB_BUILD_ROOT}" cp -R DEBIAN "${DEB_BUILD_ROOT}"
cp -R "${LINUX_BUILD_ROOT}/usr" "${DEB_BUILD_ROOT}" cp -R "${LINUX_BUILD_ROOT}/usr" "${DEB_BUILD_ROOT}"
cp -R Eluant.dll.config "${DEB_BUILD_ROOT}/${LIBDIR}/" cp -R Eluant.dll.config "${DEB_BUILD_ROOT}/${LIBDIR}/"
chmod 0644 "${DEB_BUILD_ROOT}/${LIBDIR}/"*.dll
chmod 0644 "${DEB_BUILD_ROOT}/${LIBDIR}/"*/**/*.dll
# Binaries go in /usr/games # Binaries go in /usr/games
mv "${DEB_BUILD_ROOT}/usr/bin/" "${DEB_BUILD_ROOT}/usr/games/" mv "${DEB_BUILD_ROOT}/usr/bin/" "${DEB_BUILD_ROOT}/usr/games/"
sed "s|/usr/bin|/usr/games|g" "${DEB_BUILD_ROOT}/usr/games/openra" > temp sed "s|/usr/bin|/usr/games|g" "${DEB_BUILD_ROOT}/usr/games/openra" > temp
mv -f temp "${DEB_BUILD_ROOT}/usr/games/openra" mv -f temp "${DEB_BUILD_ROOT}/usr/games/openra"
chmod +x "${DEB_BUILD_ROOT}/usr/games/openra" chmod 0755 "${DEB_BUILD_ROOT}/usr/games/openra"*
# Compress the man page
gzip -9n "${DEB_BUILD_ROOT}/usr/share/man/man6/openra.6"
# Put the copyright and changelog in /usr/share/doc/openra/ # Put the copyright and changelog in /usr/share/doc/openra/
mkdir -p "${DEB_BUILD_ROOT}/${DOCDIR}" mkdir -p "${DEB_BUILD_ROOT}/${DOCDIR}"
@@ -36,12 +42,20 @@ cp "${DEB_BUILD_ROOT}/${LIBDIR}/AUTHORS" "${DEB_BUILD_ROOT}/${DOCDIR}"
gzip -9 "${DEB_BUILD_ROOT}/${DOCDIR}/AUTHORS" gzip -9 "${DEB_BUILD_ROOT}/${DOCDIR}/AUTHORS"
DATE=`date -R` DATE=`date -R`
# Put the lintian overrides in /usr/share/lintian/overrides/
mkdir -p "${DEB_BUILD_ROOT}/${LINTIANORDIR}"
cp openra.lintian-overrides "${DEB_BUILD_ROOT}/${LINTIANORDIR}/openra"
echo -e "openra (${VERSION}) unstable; urgency=low\n" > "${DEB_BUILD_ROOT}/${DOCDIR}/changelog" echo -e "openra (${VERSION}) unstable; urgency=low\n" > "${DEB_BUILD_ROOT}/${DOCDIR}/changelog"
cat "../../../Changelog.md" >> "${DEB_BUILD_ROOT}/${DOCDIR}/changelog" echo -e " * New upstream release: $TAG" >> "${DEB_BUILD_ROOT}/${DOCDIR}/changelog"
echo -e "\n\n-- Paul Chote <paul@chote.net> ${DATE}" >> "${DEB_BUILD_ROOT}/${DOCDIR}/changelog" echo -e "\n -- Paul Chote <paul@chote.net> ${DATE}" >> "${DEB_BUILD_ROOT}/${DOCDIR}/changelog"
gzip -9 "${DEB_BUILD_ROOT}/${DOCDIR}/changelog" gzip -9 "${DEB_BUILD_ROOT}/${DOCDIR}/changelog"
rm "${DEB_BUILD_ROOT}/${LIBDIR}/COPYING" rm "${DEB_BUILD_ROOT}/${LIBDIR}/COPYING"
# Nothing should have group writable permissions
# (These might occur due to difference in umask values.)
chmod -R g-w "${DEB_BUILD_ROOT}"
# Create the control file # Create the control file
PACKAGE_SIZE=`du --apparent-size -c "${DEB_BUILD_ROOT}/usr" | grep "total" | awk '{print $1}'` PACKAGE_SIZE=`du --apparent-size -c "${DEB_BUILD_ROOT}/usr" | grep "total" | awk '{print $1}'`
sed "s/{VERSION}/$VERSION/" DEBIAN/control | sed "s/{SIZE}/$PACKAGE_SIZE/" > "${DEB_BUILD_ROOT}/DEBIAN/control" sed "s/{VERSION}/$VERSION/" DEBIAN/control | sed "s/{SIZE}/$PACKAGE_SIZE/" > "${DEB_BUILD_ROOT}/DEBIAN/control"
@@ -50,7 +64,7 @@ sed "s/{VERSION}/$VERSION/" DEBIAN/control | sed "s/{SIZE}/$PACKAGE_SIZE/" > "${
pushd "${DEB_BUILD_ROOT}" >/dev/null pushd "${DEB_BUILD_ROOT}" >/dev/null
# Calculate md5sums and clean up the ./usr/ part of them # Calculate md5sums and clean up the ./usr/ part of them
find . -type f -not -path "./DEBIAN/*" -print0 | xargs -0 -n1 md5sum | sed 's|\./usr/|/usr/|' > DEBIAN/md5sums find . -type f -not -path "./DEBIAN/*" -print0 | xargs -0 -n1 md5sum | sed 's|\./usr/|usr/|' > DEBIAN/md5sums
chmod 0644 DEBIAN/md5sums chmod 0644 DEBIAN/md5sums
# Replace any dashes in the version string with periods # Replace any dashes in the version string with periods

View File

@@ -0,0 +1,4 @@
# We don't want to have need to add an extra dependency and create symlinks to
# be able to access the FreeSans font.
openra: duplicate-font-file usr/lib/openra/mods/common/FreeSans.ttf also in fonts-freefont-ttf
openra: duplicate-font-file usr/lib/openra/mods/common/FreeSansBold.ttf also in fonts-freefont-ttf