mirror of
https://git.centos.org/centos/centpkg.git
synced 2025-02-23 16:22:55 +00:00
Add builder script to make development releases.
This commit is contained in:
parent
c3256936e4
commit
8f33dd3964
3 changed files with 44 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,6 +2,7 @@ build
|
|||
dist
|
||||
*.egg-info
|
||||
*.pyc
|
||||
*.src.rpm
|
||||
.ropeproject
|
||||
.pytest_cache
|
||||
test.conf
|
||||
|
|
40
b-srpm.sh
Executable file
40
b-srpm.sh
Executable file
|
@ -0,0 +1,40 @@
|
|||
#! /bin/sh -e
|
||||
|
||||
if [ "x$1" = "x" ]; then
|
||||
echo "Building this way needs a devrel."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
c=centpkg
|
||||
p=$(pwd)
|
||||
|
||||
echo "%define devrel $1" > c.spec
|
||||
echo "%define devsnap $(date +'%Y%m%d')git.$(git show -q --format='%h')" >> c.spec
|
||||
cat centpkg.spec >> c.spec
|
||||
|
||||
ver=$(rpmspec -q \
|
||||
--qf '%{name} %{version}\n' \
|
||||
c.spec | \
|
||||
fgrep "centpkg " | awk '{ print $2 }')
|
||||
|
||||
cd ..
|
||||
mkdir $c-$ver
|
||||
cp -a \
|
||||
$p/COPYING \
|
||||
$p/README.md \
|
||||
$p/requirements.txt \
|
||||
$p/setup.py \
|
||||
$p/src \
|
||||
$c-$ver
|
||||
tar --exclude='*~' -cvf $c-$ver.tar $c-$ver
|
||||
rm -rf $c-$ver
|
||||
cd $p
|
||||
mv ../$c-$ver.tar .
|
||||
gzip -9 $c-$ver.tar
|
||||
|
||||
rpmbuild \
|
||||
--define="_sourcedir $(pwd)" \
|
||||
--define="_srcrpmdir $(pwd)" \
|
||||
-bs c.spec
|
||||
|
||||
rm $c-$ver.tar.gz c.spec
|
|
@ -1,6 +1,6 @@
|
|||
Name: centpkg
|
||||
Version: 0.4.6
|
||||
Release: 1%{?dist}
|
||||
Version: %{!?devrel:0.4.6}%{?devrel:0.4.7}
|
||||
Release: %{?devrel:0.%{devrel}%{?devsnap:.%{devsnap}}.}1%{?dist}
|
||||
Summary: CentOS utility for working with dist-git
|
||||
License: GPLv2+
|
||||
URL: https://git.centos.org/centos/centpkg
|
||||
|
@ -40,8 +40,7 @@ Provides the centpkg-sig command for working with dist-git.
|
|||
%doc README.md
|
||||
%config(noreplace) %{_sysconfdir}/rpkg/centpkg.conf
|
||||
%{_bindir}/%{name}
|
||||
%{python3_sitelib}/%{name}
|
||||
%{python3_sitelib}/%{name}-%{version}-py%{python3_version}.egg-info
|
||||
%{python3_sitelib}/%{name}*
|
||||
|
||||
|
||||
%files sig
|
||||
|
|
Loading…
Add table
Reference in a new issue