Last active
December 11, 2015 04:19
-
-
Save Majkl578/4544397 to your computer and use it in GitHub Desktop.
Steam .deb package repacker to achieve compatibility on Debian.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [[ ! $# -eq 1 ]] ; then | |
| echo "Usage: ./debianize.sh steam_version.deb" | |
| exit | |
| fi | |
| VERSION_APPEND="+repack.1" | |
| TMP=/tmp/steam-repack | |
| NAME=$1 | |
| TARGET=`echo $NAME | sed -E "s/\.deb/$VERSION_APPEND.deb/"` | |
| if [[ ! -f $NAME ]] ; then | |
| echo "Error: File not found." | |
| exit | |
| fi | |
| echo "Unpacking..." | |
| dpkg-deb -R $NAME $TMP | |
| echo "Patching..." | |
| # fix dependencies | |
| sed -i -E "s/libpulse0 \(>= 1:(.*)\),/libpulse0 (>= \1),/;s/Version: (.+)/Version: \1$VERSION_APPEND/" $TMP/DEBIAN/control | |
| # make crappy steamdeps silent | |
| echo -e "#!/bin/bash\n\nexit 0" > $TMP/usr/bin/steamdeps | |
| echo "Building..." | |
| dpkg-deb -b $TMP/ $TARGET > /dev/null | |
| rm -rf $TMP | |
| echo "Finished!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment