[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gNewSense-users] kgnewsense-docs progress
From: |
Brian Brazil |
Subject: |
Re: [gNewSense-users] kgnewsense-docs progress |
Date: |
Mon, 23 Apr 2007 08:46:01 +0100 |
On 4/23/07, Matthew Flaschen <address@hidden> wrote:
The script is still pretty simple, but I've made enough progress to see
how things will work. I have a single sed call that runs on all xml
files and does obvious things like change Ubuntu to gNewSense and
Kubuntu to gNewSense-Kde (or whatever the distro name is). Then, there
are more specific (and difficult) custom changes made to individual
files. But the point is, the package builds, and still looks
presentable. So, tell me what you think. The script is attached.
Matt Flaschen
#!/bin/bash
#
# Copyright (C) 2006 Brian Brazil
This should be updated
# 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
#
set -ex
. config
rm -rf $WORKINGDIR
mkdir -p $WORKINGDIR
cd $WORKINGDIR
$APTGET source kubuntu-docs$VERSION
cd kubuntu-docs-*
sed -i "s/kubuntu-docs/${DISTRONAME_L}-kde-docs/g" debian/rules
cd kubuntu
find -name *.xml -execdir sed -i "/<para>This document is made
available/i\\\t<para>This document was modified for the ${DISTRONAME}-Kde
distribution.<\/para>
/Documentation Team/!s/Ubuntu/${DISTRONAME}/g
Use # as a delimiter, avoids having to escape /
s/Kubuntu/${DISTRONAME}-Kde/g
s/<!ENTITY distro-rev \"6.06 LTS\">/<!ENTITY distro-rev \"${RELEASE}\">/" "{}"
"+"
Release can be deltad-{security,backports,updates}. This will also
break if distro-rev changes.
sed -i "s/kubuntu-desktop/k${DISTRONAME_L}-desktop/
s/: .*Dapper Drake.*\n.*././" aboutkubuntu/*/about-kubuntu.xml
sed -i "s/http:\/\/releases.ubuntu.com\/kubuntu\//http:\/\/cdimage.${DOMAIN}\//g
/<varlistentry>/N
/<varlistentry>.*ShipIt/,/\/varlistentry/d
s/Dapper/${RELEASE}/" releasenotes/*/releasenotes.xml
sed -i "/about-kubuntu-name/,/\/sect2/d
s/- the <emphasis>\&distro-version;<\/emphasis> release././"
desktopguide/*/introduction.xml
cd ..
dch -D $RELEASE -v $(sed -n '1s#^.*(\(.*\)).*#\1'${DISTRONAME_L}${KDE_DOCS_VERSION}'#p'
debian/changelog) "Refer to $DISTRONAME, and don't describe unfree software"
Where are you removing references to non-free stuff?
sed -i "1s/^kubuntu-docs/${DISTRONAME_L}-kde-docs/" debian/changelog
sed -i "s/kubuntu-docs/${DISTRONAME_L}-kde-docs/;
s/Ubuntu/$DISTRONAME/;
s/^\\(Package: ${DISTRONAME_L}-kde-docs.*\\)/\1\\nConflicts:
kubuntu-docs/;" debian/control
Make control changes before the dch, the dch marks the end of the
package specific stuff.
$APTGET -y build-dep kubuntu-docs
dpkg-buildpackage -rfakeroot -us -uc
cd ..
reprepro -Vb $REPODST include $RELEASE ${DISTRONAME_L}-kde-docs*.changes
Brian