#!/bin/bash # # Copyright (C) 2008 Brian Brazil # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # set -ex . config if [ -z "$CHROOTDIR" ]; then echo "This must be passed the CHROOTDIR" exit 1 fi rm -rf $CHROOTDIR/$WORKINGDIR mkdir -p $CHROOTDIR/$WORKINGDIR cd $CHROOTDIR/$WORKINGDIR chroot $CHROOTDIR "cd $WORKINGDIR && apt-get source mesa$VERSION" # Replace each package with an empty placeholder, don't break apt too badly CONTROL=mesa-*/debian/control for pkg in $(sed -n 's/^Package: //p' $CONTROL);do # Get rid of any previous version reprepro -Vb $REPODST remove $RELEASE $pkg sed -n "/^Package: ${pkg}$/,/^$/p" $CONTROL > control echo "Version: ${VERSION#=}${DISTRONAME_L}${MESA_VERSION}" >> control equivs-build control reprepro -Vb $REPODST includedeb $RELEASE ${pkg}_*.deb done # Remove the old source package from the repo reprepro -Vb $REPODST remove $RELEASE mesa