# Detect the distribution in use %global __despace head -n 1 | tr -d '[:space:]' | sed -e 's/[(].*[)]//g' %global __lower4 cut -c 1-4 | tr '[:upper:]' '[:lower:]' %global __distfile %([ -f /etc/SuSE-release ] && echo /etc/SuSE-release || echo /etc/redhat-release) %global __distinit %(sed -e 's/ release .*//' -e 's/\\([A-Za-z]\\)[^ ]*/\\1/g' %{__distfile} | %{__despace} | %{__lower4}) %global __distvers %(sed -e 's/.* release \\([^. ]*\\).*/\\1/' %{__distfile} | %{__despace}) # Identify Alma, CentOS, CentOS Stream and Rocky Linux as rhel %if "%{__distinit}" == "a" || "%{__distinit}" == "c" || "%{__distinit}" == "cl" || "%{__distinit}" == "cs" || "%{__distinit}" == "rl" %global __distinit rhel %endif # Dist tag for Fedora is still "fc" %if "%{__distinit}" == "f" %global __distinit fc %endif Summary: Correct gratuitously incompatible HTML generated by Microsoft applications Name: demoroniser Version: 1 Release: 3.%{__distinit}%{__distvers} License: LicenseRef-Fedora-Public-Domain URL: http://www.fourmilab.ch/webtools/demoroniser/ Source0: http://www.fourmilab.ch/webtools/demoroniser/demoroniser.zip BuildArch: noarch BuildRequires: sed Requires: perl-interpreter %description Demoroniser corrects numerous errors and incompatibilities in HTML generated by, or edited with, Microsoft applications. The demoroniser keeps you from looking dumber than a bag of dirt when your Web page is viewed by a user on a non-Microsoft platform. %prep %setup -c -q sed -i -e 's@^#! /bin/perl@#!%{__perl}@' demoroniser.pl %build # Nothing to do here %install install -m 0755 -d %{buildroot}{%{_bindir},%{_mandir}/man1} install -m 0755 demoroniser.pl %{buildroot}%{_bindir} install -m 0644 demoroniser.1 %{buildroot}%{_mandir}/man1 %files %{_bindir}/demoroniser.pl %{_mandir}/man1/demoroniser.1* %changelog * Thu Mar 30 2023 Paul Howarth - 1-3 - Use SPDX-format license tag * Wed Apr 27 2022 Paul Howarth - 1-2 - Modernize spec and add dist tags * Mon Apr 18 2005 Paul Howarth - 1-1 - Initial RPM build