#!/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=1

. ./config

rm ./TOOLS/w32codec_dl.pl ./TOOLS/binary_codecs.sh ./rpm/mplayer-codecs.spec
cp $DATA/README ./TOOLS/README

#sed -i /Win32/d debian/control
sed -i /binary_codecs/d ./debian/mplayer.install
#sed -i '/w32codec/,/binary_codecs.sh\ uninstall/d' debian/copyright 
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 

# fix https://trac.mplayerhq.hu/ticket/2343
sed -i 's/.*\#include.*/\#define _GNU_SOURCE\n\n&/' cpudetect.c

changelog "Removed references to non-free stuff"

compile

