-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More branding and building un-hardcoding. Remove all GRUB features. M…
…ove user cfg files to an ukuu dir.
- Loading branch information
Brian K. White
committed
Mar 12, 2019
1 parent
466dd2e
commit f2f35b3
Showing
29 changed files
with
1,481 additions
and
1,855 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# This file is in Makefile format | ||
|
||
# The goal is to define these values in a single place, | ||
# and have as many other places as possible all refer to this. | ||
|
||
# Use Makefile syntax, as this is actually included by other makefiles, | ||
# but keep it simple enough that it can also be parsed easily by anything else. | ||
|
||
BRANDING_SHORTNAME = ukuu | ||
BRANDING_LONGNAME = Ubuntu Kernel Update Utility | ||
BRANDING_VERSION = 18.9 | ||
BRANDING_AUTHORNAME = Brian K. White | ||
BRANDING_AUTHOREMAIL = [email protected] | ||
BRANDING_WEBSITE = https://github.com/aljex/ukuu |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# This file is sourced by build-deb.sh , use bash syntax. | ||
|
||
# DEBS[] | ||
# Optional: Specify the distributions & architectures to generate *.deb | ||
# files for. Defaut = single target same as host, IE: MKDEBS[disco]=amd64 | ||
# Format is a bash associative array with [dist]=arch,arch,arch,... | ||
|
||
# Don't try to build for xenial: | ||
# Gtk/TerminalWindow.vala:242.19-242.29: error: Argument 1: Cannot convert from `char[]' to `string' | ||
# term.feed_child(c.to_utf8()); | ||
# ^^^^^^^^^^^ | ||
|
||
# just let it do the default | ||
#declare -A DEBS=( | ||
# [xenial]=i386,amd64 | ||
# [cosmic]=i386,amd64 | ||
# [disco]=i386,amd64 | ||
#) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,77 @@ | ||
#!/bin/bash | ||
# Generates .deb packages | ||
# Requires (at least): | ||
# apt install ubuntu-dev-tools # install pbuilder-dist | ||
# pbuilder-dist cosmic i386 create # create a build environment | ||
# pbuilder-disp cosmic amd64 create # create a build environment | ||
# 2019 Brian K. White <[email protected]> | ||
# Requires (one time): | ||
# sudo apt install ubuntu-dev-tools # install pbuilder-dist | ||
# pbuilder-dist cosmic i386 create # create a build environment, repeat for all dists & arches | ||
# Requires (periodically): | ||
# pbuilder-disp cosmic amd64 update # update a build environment, repeat for all dists & arches | ||
|
||
backup=${PWD} | ||
DIR=${0%*/} | ||
cd $DIR | ||
################################################################################ | ||
# functions | ||
|
||
. ./BUILD_CONFIG | ||
abrt () { echo -e "${SELF}: ${@:-Failed}" >&2 ; exit 1 ; } | ||
|
||
sh build-source.sh | ||
_mkdeb () { | ||
echo "" | ||
echo "==========================================================================" | ||
echo " ${SELF}: dist=\"${dist}\" arch=\"${arch}\"" | ||
echo "==========================================================================" | ||
echo "" | ||
|
||
build_deb_for_dist() { | ||
[[ "${dist}" ]] || abrt "_mkdeb(): Missing \"dist\"" | ||
[[ "${arch}" ]] || abrt "_mkdeb(): Missing \"arch\"" | ||
|
||
dist=$1 | ||
arch=$2 | ||
# check if base.tgz exists | ||
unset a | ||
[[ "${arch}" == "${host_arch}" ]] || a="-${arch}" | ||
b=~/pbuilder/${dist}${a}-base.tgz | ||
[[ -f ${b} ]] || abrt "Missing ${b}\nRun \"pbuilder-dist ${dist} ${arch} create\"" | ||
# TODO - check if base.tgz is old, and automatically run "pbuilder-dist ... update" | ||
|
||
echo "" | ||
echo "==========================================================================" | ||
echo " build-deb.sh : $dist-$arch" | ||
echo "==========================================================================" | ||
echo "" | ||
mkdir -pv release/${dist}/${arch} | ||
|
||
mkdir -pv release/${arch} | ||
CMD="pbuilder-dist ${dist} ${arch} build release/source/${BRANDING[SHORTNAME]}*.dsc --buildresult release/${dist}/${arch}" | ||
${CMD} || abrt "Failed: \"${CMD}\"" | ||
|
||
echo "-------------------------------------------------------------------------" | ||
mv release/${dist}/${arch}/${BRANDING[SHORTNAME]}*.deb release/${dist}/${BRANDING[SHORTNAME]}-v${PKG_VERSION}-${arch}.deb || abrt | ||
|
||
pbuilder-dist $dist $arch build release/source/${pkg_name}*.dsc --buildresult release/$arch | ||
} | ||
|
||
if [ $? -ne 0 ]; then cd "$backup"; echo "Failed"; exit 1; fi | ||
################################################################################ | ||
# main | ||
|
||
echo "--------------------------------------------------------------------------" | ||
SELF=${0##*/} | ||
cd ${0%/*} || abrt "Failed cd to \"${0%/*}\"" | ||
|
||
cp -pv --no-preserve=ownership release/${arch}/${pkg_name}*.deb release/${pkg_name}-v${pkg_version}-${arch}.deb | ||
# get pkg name from BRANDING.mak | ||
unset BRANDING ;declare -A BRANDING | ||
[[ -s BRANDING.mak ]] && while read k x v ;do | ||
[[ "${k}" =~ ^BRANDING_ ]] && BRANDING[${k#*_}]="${v}" | ||
done < BRANDING.mak | ||
[[ ${BRANDING[SHORTNAME]} ]] || abrt "Missing BRANDING_SHORTNAME (check BRANDING.mak)" | ||
|
||
if [ $? -ne 0 ]; then cd "$backup"; echo "Failed"; exit 1; fi | ||
# get pkg version from debian/changelog (not branding.mak) | ||
PKG_VERSION=`dpkg-parsechangelog --show-field Version` | ||
|
||
echo "--------------------------------------------------------------------------" | ||
# get deb build targets | ||
host_dist=`lsb_release -sc` | ||
host_arch=`dpkg --print-architecture` | ||
unset DEBS | ||
[[ -s MKDEB_TARGETS ]] && . ./MKDEB_TARGETS # no err if not present | ||
[[ "${#DEBS[@]}" -lt 1 ]] && declare -A DEBS[${host_dist}]=${host_arch} # default | ||
|
||
} | ||
export host_dist host_arch BRANDING PKG_VERSION | ||
|
||
# generate the source dsc and tar files | ||
./build-source.sh || abrt "Failed: build-source.sh" | ||
|
||
# generate debs | ||
for dist in ${!DEBS[@]} ;do | ||
for arch in ${DEBS[${dist}]//,/ } ;do _mkdeb ;done | ||
done | ||
|
||
build_deb_for_dist cosmic i386 | ||
build_deb_for_dist cosmic amd64 | ||
#build_deb_for_dist stretch armel | ||
#build_deb_for_dist stretch armhf | ||
echo | ||
echo "Generated:" | ||
find release -type f -name '*.deb' | ||
|
||
cd "$backup" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,50 @@ | ||
#!/bin/bash | ||
# Generates debian source dsc and tar files | ||
# This is run by build-deb.sh | ||
|
||
backup=${PWD} | ||
DIR=${0%/*} | ||
cd "$DIR" | ||
################################################################################ | ||
#functions | ||
|
||
. ./BUILD_CONFIG | ||
abrt () { echo "${SELF}: ${@:-Failed}" >&2 ; exit 1 ; } | ||
|
||
################################################################################ | ||
# main | ||
|
||
SELF=${0##*/} | ||
cd ${0%/*} || abrt "Failed to cd \"${0%/*}\"" | ||
|
||
echo "" | ||
echo "==========================================================================" | ||
echo " build-source.sh" | ||
echo " ${0}" | ||
echo "==========================================================================" | ||
echo "" | ||
|
||
echo "app_name: $app_name" | ||
echo "pkg_name: $pkg_name" | ||
# get pkg name from BRANDING.mak | ||
[[ "${BRANDING[SHORTNAME]}" ]] || { | ||
unset BRANDING ;declare -A BRANDING | ||
[[ -s BRANDING.mak ]] && while read k x v ; do | ||
[[ "${k}" =~ ^BRANDING_ ]] && BRANDING[${k#*_}]="${v}" | ||
done < BRANDING.mak | ||
} | ||
[[ "${BRANDING[SHORTNAME]}" ]] || abrt "Missing BRANDING_SHORTNAME (check BRANDING.mak)" | ||
|
||
echo "pkg name: ${BRANDING[SHORTNAME]}" | ||
echo "--------------------------------------------------------------------------" | ||
|
||
# clean build dir | ||
|
||
rm -rfv /tmp/builds | ||
mkdir -pv /tmp/builds | ||
|
||
make clean | ||
|
||
mkdir -pv release/source | ||
|
||
echo "--------------------------------------------------------------------------" | ||
|
||
# build source package | ||
dpkg-source --build ./ | ||
|
||
mv -vf ../$pkg_name*.dsc release/source/ | ||
mv -vf ../$pkg_name*.tar.xz release/source/ | ||
|
||
if [ $? -ne 0 ]; then cd "$backup"; echo "Failed"; exit 1; fi | ||
dpkg-source --build . || abrt | ||
mv -vf ../${BRANDING[SHORTNAME]}*.dsc release/source/ || abrt | ||
mv -vf ../${BRANDING[SHORTNAME]}*.tar.* release/source/ || abrt | ||
|
||
echo "--------------------------------------------------------------------------" | ||
|
||
# list files | ||
ls -l release/source | ||
|
||
echo "-------------------------------------------------------------------------" | ||
|
||
cd "$backup" |
Oops, something went wrong.