X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?p=util-vserver.git;a=blobdiff_plain;f=contrib%2Fmake-deb-manifest;fp=contrib%2Fmake-deb-manifest;h=17ccd1b2d4830480604093a2cd0c8c35b72556e0;hp=0000000000000000000000000000000000000000;hb=2998d8a0bdece3e9b8954dc9be04a441eaf8ec30;hpb=9e9bcf76d468cce2a545026c8e5aca3a2ac9507f diff --git a/contrib/make-deb-manifest b/contrib/make-deb-manifest new file mode 100755 index 0000000..17ccd1b --- /dev/null +++ b/contrib/make-deb-manifest @@ -0,0 +1,60 @@ +#!/bin/bash + +# Copyright (C) 2010 Daniel Hokka Zakrisson +# +# 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; version 2 of the License. +# +# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +## Usage: make-deb-manifest + +name=$2/$1 +dest=$2 +data=$3 + +getname() { + if test $1 = "lib"; then + fullname="$dest/libvserver0" + elif test $1 = "devel"; then + fullname="$dest/libvserver0-dev" + elif test $1 = "base"; then + fullname="$name" + else + fullname="$name-$1" + fi +} + +for i in {core,build,legacy,sysv,lib,devel,base}; do + getname $i + echo -n >${fullname}.install + rm -f ${fullname}.conffiles +done + +DESTDIR=debian/tmp +while read style file; do + test "$file" || continue + case "$style" in + (\#*) continue;; + esac + getname $style + set -- $file + if test "$2"; then + file="$2" + for i in ${DESTDIR}$file; do + echo "${i#${DESTDIR}}" >>${fullname}.conffiles + done + fi + for i in ${DESTDIR}$file; do + i=${i#${DESTDIR}} + echo "$i ${i%/*}" >>${fullname}.install + done +done < $data