Accepting request 494239 from home:matejcik:rpm-macros-build-test

- version bump to 2017.05.09.fc237de
- fix badly generated %posttrans snippets in cases where
  old %python_install_alternative syntax is used for secondary files
- rework %if-macros
- introduce %python_flavor, which configures behavior of generic %python_*
  macros, and can be overriden by the user
- add --force to %python_install, to make install order fully deterministic

- version bump to 2017.04.27.d2ca08c
- switch versioning scheme to date-based
- switch from using service to a custom script update.sh
- auto-generate Provides: python2-modname in old distributions
  (only for main package though)

OBS-URL: https://build.opensuse.org/request/show/494239
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python-rpm-macros?expand=0&rev=39
This commit is contained in:
Jan Matejek 2017-05-10 12:48:58 +00:00 committed by Git OBS Bridge
parent dbb3a6f950
commit 063020faf6
7 changed files with 60 additions and 28 deletions

10
README.packaging Normal file
View File

@ -0,0 +1,10 @@
This file contains information for OpenBuildService packagers.
To update this package from git, run the file update.sh
It pulls the latest version from github, assigns a date-based version
number, removes previous tarball and creates a new one, inputs the
version number in the spec file, and notes the version bump in changelog.
In the future, changelog should also be maintained in git and auto-dumped
into the changes file.

View File

@ -1,23 +0,0 @@
<services>
<service name="tar_scm" mode="localonly">
<param name="scm">git</param>
<param name="url">https://github.com/openSUSE/python-rpm-macros.git</param>
<!-- <param name="subdir">the subdirectory of your repository you want to create an archive from</param>-->
<param name="filename">python-rpm-macros</param>
<param name="versionprefix">1.0.git</param>
<!-- <param name="revision">optional: the commit hash, tag or branch you want to get</param>-->
</service>
<service name="recompress" mode="localonly">
<param name="compression">bz2</param>
<param name="file">*.tar</param>
</service>
<service name="extract_file" mode="localonly">
<param name="archive">*.tar.bz2</param>
<param name="files">*/python-rpm-macros.spec</param>
</service>
<service name="set_version" mode="localonly"/>
</services>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:65320aa38d36570e852a4711e8830b188b64dacf28fb43127d96073f3a762d31
size 12054

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:03b68c6027ed30ad932ae4275f37e8fcfddbd06499f81e8f91ac941a6206f4e9
size 12643

View File

@ -1,3 +1,23 @@
-------------------------------------------------------------------
Tue May 9 15:38:41 UTC 2017 - jmatejek@suse.com
- version bump to 2017.05.09.fc237de
- fix badly generated %posttrans snippets in cases where
old %python_install_alternative syntax is used for secondary files
- rework %if-macros
- introduce %python_flavor, which configures behavior of generic %python_*
macros, and can be overriden by the user
- add --force to %python_install, to make install order fully deterministic
-------------------------------------------------------------------
Thu Apr 27 15:43:20 UTC 2017 - jmatejek@suse.com
- version bump to 2017.04.27.d2ca08c
- switch versioning scheme to date-based
- switch from using service to a custom script update.sh
- auto-generate Provides: python2-modname in old distributions
(only for main package though)
-------------------------------------------------------------------
Wed Mar 29 12:53:05 UTC 2017 - jmatejek@suse.com

View File

@ -17,19 +17,21 @@
Name: python-rpm-macros
Version: 1.0.git.1490791775.6e5b01c
Version: 2017.05.09.fc237de
Release: 0
Summary: RPM macros for building of Python modules
License: WTFPL
Group: Development/Tools/Other
Url: https://github.com/opensuse/multipython-macros
Source: python-rpm-macros-%{version}.tar.bz2
Source100: README.packaging
Source101: update.sh
# Fedora compatibility
Provides: python2-rpm-macros
Provides: python3-rpm-macros
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#!BuildIgnore: python-rpm-macros
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This package contains SUSE RPM macros for Python build automation.

23
update.sh Normal file
View File

@ -0,0 +1,23 @@
#!/bin/bash
GIT_URL=https://github.com/openSUSE/python-rpm-macros.git
SPEC_FILE_NAME=python-rpm-macros.spec
PREV_VERSION=$(sed -rn 's/^Version:\s+(.*)$/\1/p' $SPEC_FILE_NAME)
rm python-rpm-macros-$PREV_VERSION.tar.bz2
tmpdir=tmp.$RANDOM
git clone --depth=1 $GIT_URL $tmpdir
cd $tmpdir
cp packaging/* ..
VERSION=$(git log -n 1 --date=format:%Y.%m.%d --format=format:%cd.%h)
git archive --format=tar --prefix=python-rpm-macros-$VERSION/ HEAD \
| bzip2 -c > ../python-rpm-macros-$VERSION.tar.bz2
cd ..
rm -rf $tmpdir
sed -i -r 's/^(Version:\s+)(.*)$/\1'$VERSION'/' $SPEC_FILE_NAME
osc vc -m "version bump to $VERSION"