Navigation Menu

Skip to content

Commit

Permalink
apt: use apt-cache for collecting package specific version
Browse files Browse the repository at this point in the history
It is needed to specify not only source version but also
distribution specific one (such as 5.5.28-0ubuntu0.12.04.2) to
 force specific MySQL version
  • Loading branch information
kenhys committed Nov 28, 2012
1 parent b32379c commit 60ea469
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions packages/apt/build-deb.sh
Expand Up @@ -121,16 +121,9 @@ tar xfz ${PACKAGE}_${VERSION}.orig.tar.gz
cd ${PACKAGE}-${VERSION}/
cp -rp /tmp/${PACKAGE}-debian debian
# export DEB_BUILD_OPTIONS="noopt nostrip"
case \$MYSQL_SOURCE_DIR in
*mysql-5.1*)
MYSQL_SOURCE_VERSION=\${MYSQL_SOURCE_DIR##./mysql-5.1-}
sed -i "s/@VERSION@/\$MYSQL_SOURCE_VERSION/" debian/control
;;
*mysql-5.5*)
MYSQL_SOURCE_VERSION=\${MYSQL_SOURCE_DIR##./mysql-5.5-}
sed -i "s/@VERSION@/\$MYSQL_SOURCE_VERSION/" debian/control
;;
esac
MYSQL_PACKAGE_INFO=\$(apt-cache show mysql-server | grep Version | sort | tail -1)
MYSQL_PACKAGE_VERSION=\${MYSQL_PACKAGE_INFO##Version: }
sed -i "s/@VERSION@/\$MYSQL_PACKAGE_VERSION/" debian/control
debuild -us -uc
EOF

Expand Down

0 comments on commit 60ea469

Please sign in to comment.