summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlav Vitters <olav@vitters.nl>2020-10-02 21:48:03 +0200
committerOlav Vitters <olav@vitters.nl>2020-10-02 21:48:03 +0200
commit5c8733ac6767d860b0b89d7e6ed7344538019e62 (patch)
tree142e426ab4ef96dbd880d9cca85d4c448ff2666a
parent30d421400539ebef835aa5956c7aa9068d9e0601 (diff)
downloadmgagnome-5c8733ac6767d860b0b89d7e6ed7344538019e62.tar
mgagnome-5c8733ac6767d860b0b89d7e6ed7344538019e62.tar.gz
mgagnome-5c8733ac6767d860b0b89d7e6ed7344538019e62.tar.bz2
mgagnome-5c8733ac6767d860b0b89d7e6ed7344538019e62.tar.xz
mgagnome-5c8733ac6767d860b0b89d7e6ed7344538019e62.zip
clean-spec: convert mandir and avoid using .xz
-rwxr-xr-xmgagnome38
1 files changed, 38 insertions, 0 deletions
diff --git a/mgagnome b/mgagnome
index 321916a..eda42fb 100755
--- a/mgagnome
+++ b/mgagnome
@@ -751,6 +751,44 @@ class SpecFile():
('use new Python macros', r'%py3_install', re.compile(r'^%{__python3} setup.py install$', re.MULTILINE)),
('use new Python macros', r'%{python3_version}', re.compile(r'%{py3ver}', re.MULTILINE)),
+ (
+ 'make use of _mandir macro',
+ r'%{_mandir}\g<keeppost>',
+ # /usr/share/man/man1/test_whitespaces.1.xz
+ re.compile(r'^(?:%{_datadir}/man|%_datadir/man|/usr/share/man)(?P<keeppost>/man[0-9]+/'
+ r'[a-zA-Z0-9]+[-a-zA-Z0-9_./]+\.[0-9]+[.a-z]*(?:\n|$))',
+ re.MULTILINE)
+ ),
+ (
+ 'make use of _infodir macro',
+ r'%{_infodir}\g<keeppost>',
+ # /usr/share/man/man1/test_whitespaces.1.xz
+ re.compile(r'^(?:%{_datadir}/info|%_datadir/info|/usr/share/info)(?P<keeppost>/'
+ r'[a-zA-Z0-9]+[-a-zA-Z0-9_./]+\.info[.a-z]*(?:\n|$))',
+ re.MULTILINE)
+ ),
+ (
+ # %{_mandir}/man1/*.xz
+ # avoid adding a *
+ 'avoid assuming xz compression scheme',
+ r'\g<keeppre>\g<keeppost>',
+ re.compile(r'^(?P<keeppre>(?:%{_mandir}|%_mandir)/'
+ r'[a-zA-Z0-9]+[-@a-zA-Z0-9_./]+/\*)'
+ r'\.xz(?P<keeppost>\n|$)',
+ re.MULTILINE)
+ ),
+ (
+ # %{_mandir}/man8/fxotune.8.xz
+ # need to add a *
+ 'avoid assuming xz compression scheme',
+ r'\g<keeppre>*\g<keeppost>',
+ re.compile(r'^(?P<keeppre>(?:%doc )?(?:%{_mandir}|%_mandir)/'
+ r'[a-zA-Z0-9]+[-*@+:a-zA-Z0-9_./]+[-a-zA-Z0-9_./]'
+ r'(?:/(?:%{name}|%name|%{shortname})\.[0-9a-z]+)?'
+ r')'
+ r'\.xz(?P<keeppost>\n|$)',
+ re.MULTILINE)
+ ),
]
for reason, change_to, regexp in re_clean_spec: