Last active
June 13, 2017 07:10
-
-
Save langner/12a032a8793c2df80f5d to your computer and use it in GitHub Desktop.
Script that builds postgresql-9.1 packages on Ubuntu with increased NAMEDATALEN patch (use with patch https://gist.github.com/langner/5c7bc1d74a8b957cab26)
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 | |
# Create work directory and empty it. | |
ROOTDIR="postgresql-namedatalen" | |
mkdir -p $ROOTDIR | |
cd $ROOTDIR | |
rm -rf * | |
# Get the sources and determine current version. | |
PKGNAME="postgresql-9.1" | |
apt-get source $PKGNAME | |
DIRNAME=`find . -maxdepth 1 -type d -name "$PKGNAME*"` | |
VERSION=${DIRNAME//\.\/${PKGNAME}-/} | |
# Apply out patch and change version. | |
# The patch: https://gist.github.com/langner/5c7bc1d74a8b957cab26 | |
cd $DIRNAME | |
PATCH=namedatalen.256.patch | |
quilt import $PATH | |
quilt push | |
dch -v $VERSION-namedatalen256 "Increase NAMEDATALEN to 256" | |
# Do the actual build. | |
debuild -uc -us |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment