#!/bin/sh

function fail {
    echo Something failed.  Too bad.
    exit 1
}

rm -f gstreamer-doc.spec.tmp

cat gstreamer.spec \
    | sed 's/^Name: *gstreamer*/Name:           gstreamer-doc/g' \
    | sed 's/^%define *build_doc 0/%define         build_doc 1/g' \
    > gstreamer-doc.spec.tmp || fail

mv gstreamer-doc.spec.tmp gstreamer-doc.spec || fail

echo Fixed up gstreamer-doc.spec.

