Commit 2bbf3cc9 authored by Sam Geeraerts's avatar Sam Geeraerts

Apt: add vendor information (untested) (task #14784)

parent 97e1724b
#!/bin/bash
#
# Copyright (C) 2010 Karl Goetz
# Copyright (C) 2017 Sam Geeraerts
#
# 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
......@@ -15,34 +15,49 @@
# 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
#
# Read in the configuration.
. config
# Go to the working folder.
rm -rf $WORKINGDIR
mkdir -p $WORKINGDIR
cd $WORKINGDIR
# Get the upstream source package.
apt-get source apt
# Install the packages needed to build the source package.
apt-get --yes build-dep apt
# Go into the source.
cd apt-*
rm doc/examples/sources.list
cat << EOF >> doc/examples/sources.list
# See sources.list(5) for more information, especialy
# Remember that you can only use http, ftp or file URIs
# CDROMs are managed through the apt-cdrom tool.
deb http://archive.$DOMAIN/$DISTRONAME_L/ $RELEASE $COMPONENTS
deb-src http://archive.$DOMAIN/$DISTRONAME_L/ $RELEASE $COMPONENTS
deb http://archive.$DOMAIN/$DISTRONAME_L/ $RELEASE-updates $COMPONENTS
deb-src http://archive.$DOMAIN/$DISTRONAME_L/ $RELEASE-updates $COMPONENTS
# Add vendor specific information.
VENDOR_FOLDER=vendor/${DISTRONAME_L}/
mkdir ${VENDOR_FOLDER}
# Set some variables.
cat << EOF >> ${VENDOR_FOLDER}/apt-vendor.ent
<!-- details about the keys used by the distribution -->
<!ENTITY keyring-distro "${DISTRONAME}">
<!ENTITY keyring-package "<package>${DISTRONAME_L}-archive-keyring</package>">
<!ENTITY keyring-filename "<filename>/usr/share/keyrings/${DISTRONAME_L}-archive-keyring.gpg</filename>">
<!ENTITY keyring-removed-filename "<filename>/usr/share/keyrings/${DISTRONAME_L}-archive-removed-keys.gpg</filename>">
<!ENTITY keyring-master-filename "">
<!ENTITY keyring-uri "">
<!ENTITY current-codename "dunsink">
EOF
# Point to our own package repository in the example configuration.
cat << EOF >> ${VENDOR_FOLDER}/sources.list.in
# See sources.list(5) manpage for more information
# Remember that CD-ROMs, DVDs and such are managed through the apt-cdrom tool.
deb http://archive.$DOMAIN/$DISTRONAME_L/ &current-codename $COMPONENTS
deb-src http://archive.$DOMAIN/$DISTRONAME_L/ &current-codename $COMPONENTS
deb http://archive.gnewsense.org/gnewsense $RELEASE-security $COMPONENTS
deb-src http://archive.gnewsense.org/gnewsense $RELEASE-security $COMPONENTS
EOF
echo | dch -D $RELEASE -v $(sed -n '1s#^.*(\(.*\)).*#\1'${DISTRONAME_L}${APT_VERSION}'#p' debian/changelog) "Changed for $DISTRONAME"
# Update changelog.
echo | dch -D $RELEASE -v $(sed -n '1s#^.*(\(.*\)).*#\1'${DISTRONAME_L}${APT_VERSION}'#p' debian/changelog) "Add ${DISTRONAME} information"
# Build packages.
dpkg-buildpackage $DPKGOPTS
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment