#!/bin/sh
#
#    Copyright (C) 2008-2010  Rubén Rodríguez <ruben@trisquel.info>
#
#    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
#

VERSION=2

. ./config

rm  ./TOOLS/w32codec_dl.pl ./TOOLS/binary_codecs.sh
# Patch copyright file from removed files.
cat << EOF | patch --no-backup-if-mismatch -p1
diff --git a/debian/copyright b/debian/copyright
index ed1aea5c..d269dec2 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -138,7 +138,6 @@ Files:
  TOOLS/asfinfo.c
  TOOLS/avi-fix.c
  TOOLS/avisubdump.c
- TOOLS/binary_codecs.sh
  TOOLS/checktree.sh
  TOOLS/compare.c
  TOOLS/divx2svcd.sh
@@ -259,12 +258,6 @@ Copyright:
  1994 Sun Microsystems, Inc
 License: other-1
 
-Files: TOOLS/w32codec_dl.pl
-Copyright:
- 2002 Tom Lees <tal26@cam.ac.uk>
-License: public-domain-tom
- By Tom Lees, 2002. I hereby place this script into the public domain.
-
 Files: TOOLS/vobshift.py
 Copyright:
  Gábor Farkas <gabor@nekomancer.net>
EOF
cp $DATA/README ./TOOLS/README

#sed -i /Win32/d debian/control
sed -i /binary_codecs/d ./debian/mplayer.install
sed -i 's/\(--disable-arts \\\)/\1\n\t--disable-win32dll \\/' debian/rules
sed -i 's/\(--disable-arts \\\)/\1\n\t--disable-qtx \\/' debian/rules
sed -i 's/\(--disable-arts \\\)/\1\n\t--disable-xanim \\/' debian/rules
sed -i 's/\(--disable-arts \\\)/\1\n\t--disable-real \\/' debian/rules

changelog "Removed references to non-free stuff"

package

