From b79285c02e5a4e320458b89d8ffed17779210f38 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 23 Sep 2022 15:14:05 +0900 Subject: [PATCH] Update to the latest git, expecially: Update to Unicode 15.0 (upstream #272) [[:punct:]] behavoir change (upsteam #268) --- create-tarball-from-git.sh | 41 ++++++++++++++++++++++++++++++++++++++ oniguruma.spec | 38 +++++++++++++++++++++++++++++++---- sources | 2 +- 3 files changed, 76 insertions(+), 5 deletions(-) create mode 100644 create-tarball-from-git.sh diff --git a/create-tarball-from-git.sh b/create-tarball-from-git.sh new file mode 100644 index 0000000..a4a5e0a --- /dev/null +++ b/create-tarball-from-git.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +set -e +set -x + +CURRENTDIR=$(pwd) +PKGNAME=oniguruma +TARNAME=onig + +TMPDIR=$(mktemp -d /var/tmp/$PKGNAME-XXXXXX) +pushd $TMPDIR + +GITSCM=https://github.com/kkos/$PKGNAME.git + +git clone $GITSCM +pushd $PKGNAME + +COMMIT=$(git log | head -n 1 | sed -e 's|^.*[ \t]||') +SHORTCOMMIT=$(echo $COMMIT | cut -c-7) +DATE=$(git show --format=%ci $COMMIT | head -n 1 | sed -e 's|[ \t].*$||') +SHORTDATE=$(echo $DATE | sed -e 's|-||g') +VERSION=$(cat configure.ac | grep AC_INIT | sed -n -e 's|^.*,[ \t]*\([0-9\.][0-9\.]*\).*$|\1|p') + +git log --format=fuller | head -n 12 + +echo "VERSION=$VERSION" +echo "COMMIT=$COMMIT" +echo "DATE=$DATE" + +echo +popd + +TARDIR=${TARNAME}-${VERSION}-D${SHORTDATE}git${SHORTCOMMIT} +ln -sf $PKGNAME $TARDIR +tar czf ${TARDIR}.tar.gz ${TARDIR}/./ + +mv ${TARDIR}.tar.gz ${CURRENTDIR}/ +popd + +rm -rf $TMPDIR + diff --git a/oniguruma.spec b/oniguruma.spec index cf210af..889e203 100644 --- a/oniguruma.spec +++ b/oniguruma.spec @@ -1,23 +1,44 @@ %undefine _changelog_trimtime +%global git_snapshot 1 + +%if 0%{?git_snapshot} +%define apply_git_patch git am +%else +%define apply_git_patch patch -p1 +%endif + +%if 0%{?git_snapshot} +%global gitdate 20220919 +%global gitcommit b041f6dd9967531cf396a684194d67dc2e7480f7 +%global shortcommit %(c=%{gitcommit}; echo ${c:0:7}) + +%global gitversion D%{gitdate}git%{shortcommit} +%endif + %global mainver 6.9.8 #%%global postver 1 #%%global betaver rc4 #%%define prerelease 1 -%global fedorarel 1 +%global fedorarel 2 Name: oniguruma Version: %{mainver}%{?postver:.%postver} -Release: %{?prerelease:0.}%{fedorarel}%{?betaver:.%betaver}%{?dist}.1 +Release: %{?prerelease:0.}%{fedorarel}%{?betaver:.%betaver}%{?gitversion:.%{?gitversion}}%{?dist} Summary: Regular expressions library License: BSD URL: https://github.com/kkos/oniguruma/ -Source0: https://github.com/kkos/oniguruma/releases/download/v%{mainver}%{?betaver:_%betaver}/onig-%{mainver}%{?postver:.%postver}%{?betaver:-%betaver}.tar.gz +Source0: https://github.com/kkos/oniguruma/releases/download/v%{mainver}%{?betaver:_%betaver}/onig-%{mainver}%{?postver:.%postver}%{?betaver:-%betaver}%{?gitversion:-%{?gitversion}}.tar.gz +Source1: create-tarball-from-git.sh BuildRequires: make BuildRequires: gcc +%if 0%{?git_snapshot} +BuildRequires: automake +BuildRequires: libtool +%endif %description Oniguruma is a regular expressions library. @@ -36,7 +57,7 @@ developing applications that use %{name}. %prep -%setup -q -n onig-%{mainver} +%setup -q -n onig-%{mainver}%{?gitversion:-%{?gitversion}} %{__sed} -i.multilib -e 's|-L@libdir@||' onig-config.in @@ -46,6 +67,10 @@ developing applications that use %{name}. # Disable LTO %define _lto_cflags %{nil} +%if 0%{?git_snapshot} +autoreconf -fi +%endif + %configure \ --enable-posix-api \ --enable-binary-compatible-posix-api \ @@ -102,6 +127,11 @@ find $RPM_BUILD_ROOT -name '*.la' \ %{_libdir}/pkgconfig/%{name}.pc %changelog +* Fri Sep 23 2022 Mamoru TASAKA - 6.9.8-2.D20220919gitb041f6d +- Update to the latest git, expecially: + - Update to Unicode 15.0 (upstream #272) + - [[:punct:]] behavoir change (upsteam #268) + * Fri Jul 22 2022 Fedora Release Engineering - 6.9.8-1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/sources b/sources index 29fe7ad..f3c3ae2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (onig-6.9.8.tar.gz) = 5a3d220961c22cda981bbae06dc383401771362cdf67e4f0b5d2fa8951a03907362edae498f63226287e70715c0abe4acdd22ec3ceb74bbb226234a52c36a4d7 +SHA512 (onig-6.9.8-D20220919gitb041f6d.tar.gz) = 8319e0c034e3e10ebcb4eeac09a2e6edd473128b85d0c26c24228a934d6bfd87a35e9bf89561d55b8210bae58130cf356a94fc532ed3abfbb3eb0e4360d0ab0d