!6 [sync] PR-4: Add an update-doc-version target

From: @openeuler-sync-bot 
Reviewed-by: @Charlie_li 
Signed-off-by: @Charlie_li
This commit is contained in:
openeuler-ci-bot 2025-02-21 09:12:55 +00:00 committed by Gitee
commit c24b735048
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 42 additions and 1 deletions

View File

@ -0,0 +1,37 @@
From 210a8afa5e601dda3a05e73f0415df5e8c3b9ef6 Mon Sep 17 00:00:00 2001
From: Ron <ron@debian.org>
Date: Mon, 14 Nov 2016 18:27:31 +1030
Subject: [PATCH] Add an update-doc-version target
This is similar to the automation we added to libogg, it needs to be
invoked manually after the package version is changed in configure.ac
when the documentation boilerplate needs to be updated for a release.
---
doc/Makefile.am | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/doc/Makefile.am b/doc/Makefile.am
index ad81252..417a126 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -44,3 +44,17 @@ doc_DATA = ao_append_option.html \
style.css
EXTRA_DIST = $(doc_DATA)
+
+update-doc-version:
+ @YEAR=$$(date +%Y); DAY=$$(date +%Y%m%d); \
+ for f in $(srcdir)/*.html; do \
+ sed -e "s/2010-[0-9]\{4\} Monty/2010-$$YEAR Monty/g" \
+ -e "s/libao version [0-9. -]\+/libao version $(VERSION) - $$DAY/g" \
+ < $$f > $$f.tmp; \
+ if diff -q $$f $$f.tmp > /dev/null; then \
+ rm $$f.tmp; \
+ else \
+ mv $$f.tmp $$f; \
+ fi; \
+ done;
+
--
2.27.0

View File

@ -1,12 +1,13 @@
Name: libao
Version: 1.2.0
Release: 14
Release: 15
Summary: A cross platform audio library
License: GPLv2+
URL: http://xiph.org/ao/
Source0: http://downloads.xiph.org/releases/ao/libao-%{version}.tar.gz
Patch1: 0001-ao_pulse.c-fix-latency-calculation.patch
Patch2: d5221655dfd1a2156aa6be83b5aadea7c1e0f5bd.diff
Patch3: Add-an-update-doc-version-target.patch
BuildRequires: gcc alsa-lib-devel pkgconfig(libpulse)
%description
@ -69,5 +70,8 @@ rm -rf %{buildroot}/%{_docdir}/libao*
%changelog
* Wed Dec 27 2023 fandehui <fandehui@xfusion.com> - 1.2.0-15
- Add an update-doc-version target
* Thu Nov 28 2019 huyan <hu.huyan@huawei.com> - 1.2.0-14
- Package Initialization