summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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: