3 ## toolbox for the VLC media player
4 ## $Id: toolbox,v 1.41 2003/07/14 20:36:55 sigmunau Exp $
6 ## Authors: Samuel Hocevar <sam@zoy.org>
9 ### Get a sane environment, just in case
23 --update-vc update Microsoft Visual Studio files
24 --update-po update translation files
25 --update-includes generate various include files
26 --update-glade generate and fix Glade code
27 --update-glade2 generate and fix Glade 2 code
28 --update-flexml generate and fix flexml and flex code
29 --changelog update the CVS changelog
30 --distclean "make distclean" on steroids
31 --make-woody <dir> change distdir <dir> to a woody distdir
37 ## Extract stuff from Makefile.am
41 awk 'BEGIN{a=0}{if(!a&&$0~/^'"$1"'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if($0~/^[a-zA-Z]/){exit;}print $0}}' < "${srcdir}/Makefile.am" | \
43 sed -ne 's/[^-$()_a-zA-Z0-9][^-$()_a-zA-Z0-9]*\([a-zA-Z]\)/\1/p' | \
44 sed -e "s,^,${srcdir}/,"
57 --changelog|--update-changelog)
72 --update-glade|--fix-glade)
75 --update-glade2|--update-glade-2|--fix-glade2)
91 echo "$0: unknown option $1"
98 ## Add includes to help doxygen
100 if test "${action}" = "include"
103 */vlc_common.h|*/include/vlc/*);;
104 */include/*.h) echo "#include <vlc_common.h>" ;;
111 ## Update the CVS changelog
113 if test "${action}" = "changelog"
117 cvs2cl --help >/dev/null 2>&1 || exit 1
118 rm -f ChangeLog ChangeLog.tmp
119 cvs2cl --utc --hide-filenames --no-wrap -w --stdout -g -z9 | \
120 sed -e 's/^[^0-9]/ /' -e 's/^ *$//' | \
122 YEAR=`sed -e 's/\(....\)-..-.*/\1/;q' ChangeLog.tmp`
123 LASTYEAR="$((${YEAR} - 1))"
124 sed -ne "/^${YEAR}-..-../,/^${LASTYEAR}-..-../{/^${LASTYEAR}-..-../d;p}" \
125 < ChangeLog.tmp > Changelog
128 # To generate changelog for the year 2001:
129 # sed -ne '/^2001/,/^2000/{/^2000/d;p}'
133 ## Update the MSVC project files
135 if test "${action}" = "vc"
137 echo "generating Visual Studio files..."
139 if test -z "${srcdir}"; then
140 srcdir="`sed -ne 's/^srcdir *= *//p' < Makefile`"
143 # The evil ^M. printf '\r' does not work in Cygwin.
146 # Variables we get from configure.ac
147 LIBVLC_VERSION=`sed -ne '/AC_INIT/s/.*,\(.*\))/\1/p' < configure.ac`
148 LIBVLC_CODENAME=`sed -ne '/CODENAME=/s/.*"\(.*\)"/\1/p' < configure.ac`
149 LIBVLC_SYMBOL=`echo $LIBVLC_VERSION | sed -e 'y/.-/__/'`
151 # Sources that get built under Win32 - FIXME: anyone wanna deuglify this? :)
152 LIBVLC_SOURCES=`getfiles SOURCES_libvlc_common; getfiles SOURCES_libvlc_win32; getfiles SOURCES_libvlc_dirent; getfiles SOURCES_libvlc_getopt; getfiles SOURCES_libvlc_libc`
154 LIBVLC_HEADERS=`getfiles HEADERS_include; getfiles HEADERS_include_built`
156 LIBVLC_PKG_HEADERS=`getfiles dist_pkginclude_HEADERS`
159 rm -f evc/*.vcp msvc/*.dsp
162 for target in evc/config.h msvc/config.h
166 sed -e "s/@CODENAME@/${LIBVLC_CODENAME}/" \
167 -e "s/@VERSION@/${LIBVLC_VERSION}/" \
168 -e "s/@SYMBOL@/${LIBVLC_SYMBOL}/" < ${target}.in > ${target}
172 for target in evc/libvlc.vcp msvc/libvlc.dsp
175 # Top of the project file
176 perl -pe 'if(/§SOURCES§/){last;}' < ${target}.in > ${target}
178 for file in `for i in ${LIBVLC_SOURCES} ; do echo $i ; done | grep -v "/.*/"`
180 cat >> ${target} << EOF
181 # Begin Source File${M}
182 SOURCE="..\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M}
183 # ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M}
184 # End Source File${M}
187 for subdir in `for i in ${LIBVLC_SOURCES} ; do echo $i ; done | grep "/.*/" | cut -f2 -d/ | sort | uniq`
189 cat >> ${target} << EOF
190 # Begin Group "${subdir}"${M}
192 for file in `for i in ${LIBVLC_SOURCES} ; do echo $i ; done | grep "/${subdir}/"`
194 if test "${target}" = "evc/libvlc.vcp"
196 cat >> ${target} << EOF
197 # Begin Source File${M}
198 SOURCE="..\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M}
199 # ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M}
200 !IF "\$(CFG)" == "libvlc - Win32 (WCE MIPS) Release"${M}
201 # PROP Output_Dir "MIPSRel\\${subdir}"${M}
202 # PROP Intermediate_Dir "MIPSRel\\${subdir}"${M}
203 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE MIPS) Debug"${M}
204 # PROP Output_Dir "MIPSDbg\\${subdir}"${M}
205 # PROP Intermediate_Dir "MIPSDbg\\${subdir}"${M}
206 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE SH4) Release"${M}
207 # PROP Output_Dir "SH4Rel\\${subdir}"${M}
208 # PROP Intermediate_Dir "SH4Rel\\${subdir}"${M}
209 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE SH4) Debug"${M}
210 # PROP Output_Dir "SH4Dbg\\${subdir}"${M}
211 # PROP Intermediate_Dir "SH4Dbg\\${subdir}"${M}
212 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE SH3) Release"${M}
213 # PROP Output_Dir "SH3Rel\\${subdir}"${M}
214 # PROP Intermediate_Dir "SH3Rel\\${subdir}"${M}
215 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE SH3) Debug"${M}
216 # PROP Output_Dir "SH3Dbg\\${subdir}"${M}
217 # PROP Intermediate_Dir "SH3Dbg\\${subdir}"${M}
218 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE ARM) Release"${M}
219 # PROP Output_Dir "ARMRel\\${subdir}"${M}
220 # PROP Intermediate_Dir "ARMRel\\${subdir}"${M}
221 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE ARM) Debug"${M}
222 # PROP Output_Dir "ARMDbg\\${subdir}"${M}
223 # PROP Intermediate_Dir "ARMDbg\\${subdir}"${M}
224 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE x86em) Release"${M}
225 # PROP Output_Dir "X86EMRel\\${subdir}"${M}
226 # PROP Intermediate_Dir "X86EMRel\\${subdir}"${M}
227 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE x86em) Debug"${M}
228 # PROP Output_Dir "X86EMDbg\\${subdir}"${M}
229 # PROP Intermediate_Dir "X86EMDbg\\${subdir}"${M}
231 # End Source File${M}
234 cat >> ${target} << EOF
235 # Begin Source File${M}
236 SOURCE="..\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M}
237 # ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M}
238 !IF "\$(CFG)" == "libvlc - Win32 Release"${M}
239 # PROP Output_Dir "Release\\${subdir}"${M}
240 # PROP Intermediate_Dir "Release\\${subdir}"${M}
241 !ELSEIF "\$(CFG)" == "libvlc - Win32 Debug"${M}
242 # PROP Output_Dir "Debug\\${subdir}"${M}
243 # PROP Intermediate_Dir "Debug\\${subdir}"${M}
245 # End Source File${M}
249 cat >> ${target} << EOF
254 perl -e 'while(<>){if(/§SOURCES§/){last;}}while(<>){if(/§HEADERS§/){last;}print $_}' < ${target}.in >> ${target}
255 for file in ${LIBVLC_HEADERS}
257 cat >> ${target} << EOF
258 # Begin Source File${M}
259 SOURCE="..\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M}
260 # End Source File${M}
263 cat >> ${target} << EOF
264 # Begin Group "vlc"${M}
266 for file in ${LIBVLC_PKG_HEADERS}
268 cat >> ${target} << EOF
269 # Begin Source File${M}
270 SOURCE="..\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M}
271 # End Source File${M}
274 cat >> ${target} << EOF
277 perl -e 'while(<>){if(/§HEADERS§/){last;}}while(<>){print $_}' < ${target}.in >> ${target}
281 for dir in `sed -ne 's,modules/\(.*\)/Makefile,\1,p' ${srcdir}/configure.ac`
283 mf="${srcdir}/modules/${dir}/Modules.am"
284 for mod in `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf}`
286 # this is an attempt at getting a list of plugin sources... we take the
287 # production and remove everything that does not contain "module", which
288 # means you miss $(NULL), but other variables too.
289 allfiles=`grep -v '[^-_a-zA-Z0-9]*#' ${mf} | awk 'BEGIN{a=0}{if(!a&&$0~/^SOURCES_'${mod}'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if($0~/^[a-zA-Z]/){exit;}print $0}}' | tr '\\ ' '\n\n' | grep '\.'`
290 hfiles=`for i in ${allfiles} ; do echo "$i" ; done | grep '\.h$'`
291 cfiles=`for i in ${allfiles} ; do echo "$i" ; done | grep -v '\.h$'`
292 for msdir in evc msvc
294 test "${msdir}" = "evc" && suf="vcp" || suf="dsp"
295 source="${msdir}/plugins.${suf}.in"
296 target="${msdir}/plugin_${mod}.${suf}"
298 perl -pe 'if(/§SOURCES§/){last;} s/§PLUGIN§/'${mod}'/g' < ${source} > ${target}
299 for cfile in ${cfiles}
301 cat >> ${target} << EOF
302 # Begin Source File${M}
303 SOURCE="..\\modules\\`echo ${dir}/${cfile} | sed 's,/,\\\\,g'`"${M}
304 # ADD CPP /D "__VLC__" /D "__PLUGIN__" /D "MODULE_NAME=${mod}" /D "MODULE_NAME_IS_${mod}" ${M}
305 # End Source File${M}
308 # sed is really nicer for this... unfortunately it's broken under cygwin
309 # sed -ne '1,/§SOURCES§/d; /§HEADERS§/,$d; p' < ${source} >> ${target}
310 perl -e 'while(<>){if(/§SOURCES§/){last;}}while(<>){if(/§HEADERS§/){last;}print $_}' < ${source} >> ${target}
311 for hfile in ${hfiles}
313 cat >> ${target} << EOF
314 # Begin Source File${M}
315 SOURCE="..\\modules\\`echo ${dir}/${hfile} | sed 's,/,\\\\,g'`"${M}
316 # End Source File${M}
319 # sed -ne '1,/§HEADERS§/d; p' < ${source} >> ${target}
320 perl -e 'while(<>){if(/§HEADERS§/){last;}}while(<>){print $_}' < ${source} >> ${target}
326 for target in evc/vlc.vcp msvc/vlc.dsp
329 # Top of the project file
330 perl -pe 'if(/§SOURCES§/){last;}' < ${target}.in > ${target}
332 if test "${target}" = "evc/vlc.vcp"
334 cat >> ${target} << EOF
335 # Begin Source File${M}
336 SOURCE="..\\evc\\vlc.c"${M}
337 # End Source File${M}
340 cat >> ${target} << EOF
341 # Begin Source File${M}
342 SOURCE="..\\src\\vlc.c"${M}
343 # End Source File${M}
346 # Bottom of the project file - handles resource files too
347 perl -e 'while(<>){if(/§SOURCES§/){last;}}while(<>){print $_}' < ${target}.in >> ${target}
355 ## Update the potfiles because no one ever does it
357 if test "${action}" = "po"
359 # create a fake file containing win32 strings
360 rm -f modules/gui/win32/strings.cpp
361 #printf "/* Automatically generated by 'toolbox --update-po', please don't compile */\n" > modules/gui/win32/strings.cpp
362 #find modules/gui/win32 -name '*.dfm' | while read file
364 # printf "\n/*\n * from $file:\n */\n\n" >> modules/gui/win32/strings.cpp
365 # perl -ne 'chop; chop; if( / (Caption|Text|Hint) / || $buffer =~ /[+=] *$/ ) { $buffer =~ s/\+ *$//; $buffer .= $_; } if( $buffer =~ /'"'"' *$/) { $buffer =~ s/'"'"'/"/g; $buffer =~ s/\\/\\\\/g; $buffer =~ s/=/= _(/; print $buffer." );\n"; $buffer = "";}' < $file | grep -v '"-*"' | grep -v '"http://' | grep -v '"vlcs"' >> modules/gui/win32/strings.cpp || exit 1
367 # find out the source files
369 echo "# automatically created by toolbox --update-po" > po/POTFILES.in
370 echo "" >> po/POTFILES.in
371 echo "# main sources" >> po/POTFILES.in
372 find include src -name '*.[chm]' -o -name '*.[ch]pp' | sort >> po/POTFILES.in
373 echo "" >> po/POTFILES.in
374 echo "# modules" >> po/POTFILES.in
375 find modules -name '*.[chm]' -o -name '*.[ch]pp' \
376 | grep -v '\(gui/win32/\|\.moc\.\)' \
377 | sort >> po/POTFILES.in
382 make vlc.pot || exit 1
383 make update-po || exit 1
390 ## Create include files
392 if test "${action}" = "includes"
396 if test -z "${srcdir}"; then
397 srcdir="`sed -ne 's/^srcdir *= *//p' < Makefile`"
399 LIBVLC_HEADERS=`getfiles HEADERS_include`
400 BUILTINS=`sed -ne 's/.*builtins *= *" *\([^"]*\)".*/\1/p' vlc-config`
402 file="${srcdir}/include/vlc_symbols.h"
405 echo '/* DO NOT EDIT THIS FILE! See Makefile.am */' >> ${file}.in
406 echo 'struct module_symbols_t {' >> ${file}.in
407 cat ${LIBVLC_HEADERS} | grep '^ *VLC_EXPORT.*;' | sed -e 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/ \1 (* \2_inner) \3;/' >> ${file}.in
408 echo '};' >> ${file}.in
409 echo '#ifdef __PLUGIN__' >> ${file}.in
410 cat ${LIBVLC_HEADERS} | grep '^ *VLC_EXPORT.*;' | sed -e 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/# define \2 p_symbols->\2_inner/' >> ${file}.in
411 echo '#endif /* __PLUGIN__ */' >> ${file}.in
412 if diff >/dev/null 2>&1 ${file} ${file}.in
416 echo "creating new ${file}"
417 mv -f ${file}.in ${file}
420 file="${srcdir}/src/misc/modules_plugin.h"
422 rm -f ${file}.tmp && cp ${file}.in ${file}.tmp
423 sed -e 's#.*\$[I][d]:.*# * Automatically generated from '${file}'.in by bootstrap#' < ${file}.in > ${file}.tmp
424 echo '#define STORE_SYMBOLS( p_symbols ) \' >> ${file}.tmp
425 cat ${LIBVLC_HEADERS} | grep '^ *VLC_EXPORT.*;' | sed -e 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/ (p_symbols)->\2_inner = \2; \\/' >> ${file}.tmp
426 echo '' >> ${file}.tmp
427 if diff >/dev/null 2>&1 ${file} ${file}.tmp
431 echo "creating new ${file}"
432 mv -f ${file}.tmp ${file}
435 file="${srcdir}/src/misc/modules_builtin.h"
437 rm -f ${file}.tmp && cp ${file}.in ${file}.tmp
438 if test -n "${BUILTINS}"
440 for i in `echo ${BUILTINS}`
442 echo "int vlc_entry__`echo $i | sed -e 'y@/@_@' -e 's@\..*@@'`( module_t* );" >>${file}.tmp
444 echo "" >> ${file}.tmp
446 echo "#define ALLOCATE_ALL_BUILTINS() \\" >> ${file}.tmp
447 echo " do \\" >> ${file}.tmp
448 echo " { \\" >> ${file}.tmp
449 if test -n "${BUILTINS}"
451 for i in `echo ${BUILTINS}`
453 echo " ALLOCATE_BUILTIN(`echo $i | sed -e 'y@/@_@' -e 's@\..*@@'`); \\" >> ${file}.tmp
456 echo " } while( 0 );" >> ${file}.tmp
457 echo "" >> ${file}.tmp
458 if diff >/dev/null 2>&1 ${file} ${file}.tmp
462 echo "creating new ${file}"
463 mv -f ${file}.tmp ${file}
470 ## Fix glade-generated files
472 if test "${action}" = "glade"
474 for file in modules/gui/gtk/gnome.glade modules/gui/gtk/gtk.glade modules/gui/familiar/familiar.glade
476 echo "generating code from $file"
477 glade -w $file || exit 1
480 for file in modules/gui/gtk/gnome_interface.c modules/gui/gtk/gtk_interface.c modules/gui/familiar/interface.c
483 if grep "DO NOT EDIT THIS FILE" $file >/dev/null 2>&1
486 cat > $file.$$.bak << EOF
487 /* This file was created automatically by glade and fixed by bootstrap */
492 -e 's#_(\(".:..:.."\))#\1#' \
493 -e 's#_(\("[a-z0-9]*://[^"]*"\))#\1#' \
494 -e 's#_("---")#"---"#' \
495 -e 's#_("--")#"--"#' \
496 -e 's#_("/dev/dvd")#"/dev/dvd"#' \
497 -e 's#_(\("./."\))#\1#' \
498 < $file >> $file.$$.bak
499 mv -f $file.$$.bak $file
503 for file in modules/gui/gtk/gtk_support.h modules/gui/familiar/support.h
506 if grep "DO NOT EDIT THIS FILE" $file >/dev/null 2>&1
509 sed -e 's/DO NOT EDIT.*/Created by glade, fixed by bootstrap/' \
510 -e 's,<config.h>,<vlc/vlc.h>,' \
511 -e 's,#if.*ENABLE_NLS.*,#if 0 /* Disabled by bootstrap */,' \
512 -e 's,#else,/* & */,' \
513 < $file > $file.$$.bak
514 mv -f $file.$$.bak $file
522 ## Fix glade2-generated files
524 if test "${action}" = "glade2"
526 for file in modules/gui/gtk2/gnome2.glade modules/gui/gtk2/gtk2.glade
528 echo "generating code from $file"
529 glade-2 -w $file || exit 1
536 ## Fix flexml-generated files
538 if test "${action}" = "flexml"
540 cd modules/gui/skins/parser
541 flexml -SH -a skin.act skin.dtd
542 # comment the dummy main function
544 sed 's@int main@//int main@' < $file > $file.$$.bak
545 mv -f $file.$$.bak $file
546 flex -oflex.c -BLs skin.l
552 if test "${action}" = "distclean"
555 # a naive sanity check to make sure we are in a VLC tree
556 test -f vlc.spec.mdk -a -f debian/rules || exit 1
558 find . -type f '(' -name '*.[oa]' -o -name '*.so' -o -name '*.sl' -o -name '*.dylib' -o -name '*.dll' -o -name .dirstamp -o -name Makefile.in -o -name 'stamp-h*' -o -name '*~' -o -name '*.bak' -o -name '*.moc.cpp' ')' -exec rm -f '{}' ';'
559 (cd autotools && find . -name '[a-z]*' -exec rm -f '{}' ';')
560 (cd debian && find . -type d -name '[a-z]*' -maxdepth 1 -exec rm -Rf '{}' ';')
561 find msvc -type f -name '*.dsp' -exec rm -f '{}' ';'
562 find evc -type f -name '*.vcp' -exec rm -f '{}' ';'
563 #find . -type d -name '.deps' -exec rm -Rf '{}' ';'
564 # there's some more cruft all around
565 rm -f config.h config.log config.status
566 rm -f vlc vlc-config Makefile Modules.am
567 rm -Rf autom4te.cache
568 rm -f mozilla/vlcintf.h mozilla/vlcintf.xpt
569 # FIXME: a lot of Makefiles are still there
572 if test "${action}" = "woody"
577 # changelog: replace (1.2.3-4) with (1.2.3-0woody.4)
578 sed -e 's/^vlc (\([^)]*\)-\([^-)]*\))/vlc-woody (\1-0woody.\2)/' \
579 -e 's/ unstable; / stable; /' \
580 < "$1/debian/changelog" > "$1/debian/changelog.woody"
581 mv "$1/debian/changelog.woody" "$1/debian/changelog"
583 # control: replace liba52-*-dev with a52dec-dev (>=0.7.3)
584 # libdv*-dev with libdv-dev
585 # kdelibs4-dev with kdelibs-dev
586 # libqt3-mt-dev libqt3-compat-headers with libqt-dev
587 # libarts1-dev with libarts-dev
588 # libdvdread3-dev with libdvdread2-dev
589 # libdvdplay0-dev (>=1.0.1-2) with libdvdplay0-dev
590 # remove libwxgtk2.4-dev
592 # libidl0 (workaround for mozilla-dev's bad deps)
593 # libglib2.0-0 (workaround for mozilla-dev's bad deps)
595 # change Source: vlc with Source: vlc-woody
596 # Section: gnome with Section: graphics
597 # Section: kde with Section: kde
598 # Section: libdevel with Section: devel
599 sed -e 's/liba52-[^-]*-dev/a52dec-dev (>=0.7.3)/' \
600 -e 's/libdv[0-9]*-dev/libdv-dev/' \
601 -e 's/kdelibs[0-9]*-dev/kdelibs-dev/' \
602 -e 's/libqt[0-9]*-mt-dev/libqt-dev/' \
603 -e 's/, libqt[0-9]*-compat-headers[^,]*//' \
604 -e 's/libarts[0-9]*-dev/libarts-dev/' \
605 -e 's/libdvdread[0-9]*-dev/libdvdread2-dev/' \
606 -e 's/, libdvdplay0-dev[^,]*/, libdvdplay0-dev/' \
607 -e 's/, libwx[^,]*//' \
608 -e '/Package: wxvlc/,/^ *$/d' \
609 -e 's/, libflac-dev[^,]*//' \
610 -e 's/, libidl0[^,]*//' \
611 -e 's/, libglib2.0-0[^,]*//' \
612 -e 's/, libmatroska-dev[^,]*//' \
613 -e 's/Source: vlc/Source: vlc-woody/' \
614 -e 's/Section: gnome/Section: graphics/' \
615 -e 's/Section: kde/Section: graphics/' \
616 -e 's/Section: libdevel/Section: devel/' \
617 < "$1/debian/control" > "$1/debian/control.woody"
618 mv "$1/debian/control.woody" "$1/debian/control"
620 # rules: remove wxwindows and skins stuff
621 # remove flac support
622 # remove matroska support
623 sed -e '/# Package: wxvlc/,/^ *$/d' \
624 -e 's,--enable-wxwindows,--disable-wxwindows,' \
625 -e 's,--enable-skins,--disable-skins,' \
626 -e 's,--enable-flac,--disable-flac,' \
627 -e 's,--enable-mkv,--disable-mkv,' \
628 < "$1/debian/rules" > "$1/debian/rules.woody"
629 mv "$1/debian/rules.woody" "$1/debian/rules"
630 chmod 0755 "$1/debian/rules"