parent
2a9db67b9e
commit
55653e348f
@ -1,18 +1,23 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Verision of wireguide
|
# This is where I keep my sources
|
||||||
VERSION=$(awk -F '"' '/self.version =/ {print $2}' ~/sources/wireguide/src/wireguide)
|
BASEDIR=~/sources
|
||||||
|
# Version of wireguide
|
||||||
|
VERSION=$(awk -F '"' '/self.version =/ {print $2}' ${BASEDIR}/wireguide/src/wireguide)
|
||||||
|
|
||||||
|
cd ~/sources
|
||||||
|
|
||||||
# Convert deb to rpm
|
# Convert deb to rpm
|
||||||
sudo alien -g -r ~/sources/wireguide_${VERSION}_all.deb
|
sudo alien -g -r ${BASEDIR}/wireguide_${VERSION}_all.deb
|
||||||
|
|
||||||
# Remove generated specfile
|
# Remove generated specfile
|
||||||
sudo rm ~/sources/wireguide-${VERSION}/wireguide-*.spec
|
sudo rm ${BASEDIR}/wireguide-${VERSION}/wireguide-*.spec
|
||||||
|
|
||||||
# Replace with our own
|
# Replace with our own
|
||||||
sed "s/##VERSION##/${VERSION}/" ~/sources/wireguide/rpm/wireguide-TEMPLATE.spec > ~/sources/wireguide-${VERSION}/wireguide-${VERSION}.spec
|
sed "s/##VERSION##/${VERSION}/" ${BASEDIR}/wireguide/rpm/wireguide-TEMPLATE.spec | sudo tee ${BASEDIR}/wireguide-${VERSION}/wireguide-${VERSION}.spec
|
||||||
|
|
||||||
# Change to build dir
|
# Change to build dir
|
||||||
cd ~/sources/wireguide-${VERSION}
|
cd wireguide-${VERSION}
|
||||||
|
|
||||||
# Build rpm
|
# Build rpm
|
||||||
sudo rpmbuild --buildroot=~/sources/wireguide-${VERSION} -bb wireguide-${VERSION}.spec
|
sudo rpmbuild --buildroot=$(pwd) -bb wireguide-${VERSION}.spec
|
||||||
|
sudo chown ${USER}:${USER} ${BASEDIR}/wireguide-${VERSION}.noarch.rpm
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
# Where I keep the sources
|
||||||
|
BASEDIR=~/sources
|
||||||
# Version of wireguide
|
# Version of wireguide
|
||||||
VERSION=$(awk -F '"' '/self.version =/ {print $2}' ~/sources/wireguide/src/wireguide)
|
VERSION=$(awk -F '"' '/self.version =/ {print $2}' ${BASEDIR}/wireguide/src/wireguide)
|
||||||
|
|
||||||
# Where i keep the sources
|
# Change to source dir
|
||||||
cd ~/sources
|
cd ${BASEDIR}/wireguide
|
||||||
|
|
||||||
# Build deb
|
# Build deb
|
||||||
dpkg-buildpackage -us -uc
|
dpkg-buildpackage -us -uc
|
||||||
|
|
||||||
# Add binary and source to repo
|
# Add binary and source to repo
|
||||||
reprepro --basedir ~/sources/debian includedeb unstable ~/sources/wireguide_${VERSION}_all.deb
|
reprepro --basedir ${BASEDIR}/debian includedeb unstable ${BASEDIR}/wireguide_${VERSION}_all.deb
|
||||||
reprepro --basedir ~/sources/debian -S net --priority optional includedsc unstable ~/sources/wireguide_${VERSION}.dsc
|
reprepro --basedir ${BASEDIR}/debian -S net --priority optional includedsc unstable ${BASEDIR}/wireguide_${VERSION}.dsc
|
||||||
|
Loading…
Reference in new issue