Created
August 18, 2014 13:18
-
-
Save hkwi/ef12e2a19a68dd278011 to your computer and use it in GitHub Desktop.
python-wheel epel7 rpm generator script
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
#!/bin/bash | |
yum install -y http://ftp.iij.ad.jp/pub/linux/fedora/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm | |
yum update -y | |
yum install -y rpmdevtools python-devel python-setuptools pytest python-jsonschema python-keyring | |
pkg=python-wheel | |
SRCDIR=$(rpmdev-setuptree -d | head -n 2 | tail -n 1 | awk -e '{print $2}') | |
curl http://pkgs.fedoraproject.org/cgit/$pkg.git/snapshot/$pkg-master.tar.gz | tar zxf - -C $SRCDIR --strip 1 | |
sed -i "s/%global with_python3 1/%if 0%{?fedora}\n%global with_python3 1\n%else\n%global with_python3 0\n%endif/" $SRCDIR/$pkg.spec | |
# or simply, | |
# sed -i "s/with_python3 1/with_python3 0/" $SRCDIR/$pkg.spec | |
spectool -gf -R $SRCDIR/$pkg.spec | |
rpmbuild -ba $SRCDIR/$pkg.spec |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment