File _main.spec of Package Meta

#
# spec file for package _main
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
  %define _fillupdir /var/adm/fillup-templates
%endif

@@VERSION@@

%define __perl_requires		%{nil}
%define __os_install_post	/usr/lib/rpm/brp-compress \\\
  %(ls /usr/lib/rpm/brp-suse.d/* 2> /dev/null | grep -vE 'symlink|desktop') %{nil}

%bcond_with     zypper_posttrans

Name:           texlive-filesystem
Version:        %{texlive_version}.%{texlive_noarch}
Release:        0
Summary:        Basic file system of TeX Live
License:        Apache-2.0 AND Artistic-1.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND LPPL-1.3c AND LPPL-1.0 AND MIT AND BSD-3-Clause AND SUSE-TeX AND SUSE-Public-Domain
Group:          Productivity/Publishing/TeX/Base
URL:            https://www.tug.org/texlive/
%if 0%{?suse_version} <= 1550
Requires:       cron
%else
Requires:       rpm_macro(_unitdir)
%endif
Requires:       python3
Requires(pre):  user(mktex)
Requires(pre):  group(mktex)
Requires(pre):  /usr/bin/stat
%if 0%{?suse_version} > 1550
Requires(pre):  rpm_macro(service_add_pre)
%endif
Requires(post): %fillup_prereq
Requires(post): permissions
Requires(post): /usr/bin/mktemp
Requires(post): /usr/bin/mv
# Requires(post): /usr/bin/setpriv
# We need a working full-featured setpriv(8)
Requires(post): util-linux
%if 0%{?suse_version} > 1550
Requires(pre):  rpm_macro(service_add_post)
%endif
Requires(postun): coreutils
Requires(postun): ed
Requires(postun): findutils
Requires(postun): grep
Requires(postun): sed
%if 0%{?suse_version} > 1550
Requires(pre):  rpm_macro(service_del_postun)
%endif
Requires(pre):  /usr/bin/perl
Requires(pre):  /usr/bin/clear
Requires(pre):  /usr/bin/dialog
Requires(pre):  coreutils
Requires(pre):  ed
Requires(pre):  findutils
Requires(pre):  grep
Requires(pre):  sed
%if 0%{?suse_version} > 1550
Requires(preun): rpm_macro(service_del_preun)
%endif
Requires(posttrans): coreutils
Requires(posttrans): ed
Requires(posttrans): findutils
Requires(posttrans): grep
Requires(posttrans): sed
Requires(posttrans): texlive-kpathsea-bin >= %{texlive_version}
Requires(posttrans): texlive-kpathsea >= %{texlive_version}
Requires(posttrans): texlive-scripts-bin >= %{texlive_version}
Requires(posttrans): texlive-scripts >= %{texlive_version}
Requires(verify): permissions
Obsoletes:      tetex <= %{texlive_previous}
BuildRequires:  cron
BuildRequires:  ed
BuildRequires:  fontconfig
#BuildConflicts: texinfo
Source10:       rc.config.texlive
Source11:       update.texlive
Source12:       texlive.cron
Source13:       texlive.sh
Source14:       texlive.csh
Source15:       fc-texlive.conf
Source16:       fc-t1-texlive.conf
Source17:       fc-truetype-texlive.conf
Source18:       texlive.timer
Source19:       texlive.service
Source20:       texlive-initial.service
Source30:       texlive-filesystem-rpmlintrc
Source31:       dot.dvipsrc
Source42:       zypplugin.in
@@SOURCES@@
BuildArch:      noarch
Prefix:         %{_bindir}
# skip-check-libtool-deps

%global _varlib		%{_localstatedir}/lib

%define _texmfdistdir	%{_datadir}/texmf
%if 0%{texlive_version} >= 2013
%define _texmfmaindir	%{_texmfdistdir}
%define _texmfdirs	%{_texmfdistdir}
%else
%define _texmfmaindir	%{_libexecdir}/texmf
%define _texmfdirs	\{%{_texmfdistdir},%{_texmfmaindir}\}
%endif

%define _texmfconfdir	%{_sysconfdir}/texmf
%define _texmfvardir	%{_varlib}/texmf
%define _texmfcache	%{_localstatedir}/cache/texmf
%define _fontcache	%{_texmfcache}/fonts
#
%define _x11bin		%{_prefix}/bin
%define _x11lib		%{_libdir}
%define _x11data	%{_datadir}/X11
%define _x11inc		%{_includedir}
%define _appdefdir	%{_x11data}/app-defaults
#
%define texgrp          mktex
%define texusr          mktex

#define texgid          505
#define texuid          505
#
%description
The basic file system layout for TeX Live installation.

@@PACKAGES@@

%package -n texlive-updmap-map
Version:        %{texlive_version}.%{texlive_noarch}.svn54495
Release:        0
Summary:        Auto-generated font map files
License:        LPPL-1.0
Group:          Productivity/Publishing/TeX/Base
URL:            https://www.tug.org/texlive/
Requires(pre):  texlive-filesystem >= %{texlive_version}
Requires(post): coreutils
Requires(postun): coreutils
Requires(postun): texlive >= %{texlive_version}
Requires(postun): texlive-filesystem >= %{texlive_version}
Requires(postun): texlive-kpathsea-bin >= %{texlive_version}
Requires(postun): texlive-kpathsea >= %{texlive_version}
Requires(postun): texlive-scripts-bin >= %{texlive_version}
Requires(postun): texlive-scripts >= %{texlive_version}
Requires(posttrans): coreutils
Requires(posttrans): ed
Requires(posttrans): findutils
Requires(posttrans): grep
Requires(posttrans): sed
Requires(posttrans): texlive >= %{texlive_version}
Requires(posttrans): texlive-filesystem >= %{texlive_version}
Requires(posttrans): texlive-kpathsea-bin >= %{texlive_version}
Requires(posttrans): texlive-kpathsea >= %{texlive_version}
Requires(posttrans): texlive-scripts-bin >= %{texlive_version}
Requires(posttrans): texlive-scripts >= %{texlive_version}
Provides:       tex(builtin35.map)
Provides:       tex(download35.map)
Provides:       tex(kanjix.map)
Provides:       tex(pdftex.map)
Provides:       tex(pdftex_dl14.map)
Provides:       tex(pdftex_ndl14.map)
Provides:       tex(ps2pk.map)
Provides:       tex(psfonts.map)
Provides:       tex(psfonts_pk.map)
Provides:       tex(psfonts_t1.map)

%description -n texlive-updmap-map
These map files are regenerated every time a new font is added.
There is no need to rebuild formats or update binaries because
of such updates, hence this separate package.

%post -n texlive-updmap-map
mkdir -p /var/run/texlive
> /var/run/texlive/run-mktexlsr
> /var/run/texlive/run-update

%postun -n texlive-updmap-map
mkdir -p /var/run/texlive
> /var/run/texlive/run-mktexlsr
> /var/run/texlive/run-update
if test $1 = 0; then
    exit 0
fi

%package -n texlive-devel
Version:        %{texlive_version}.%{texlive_noarch}
Release:        0
Summary:        Basic development packages for TeXLive
License:        BSD-3-Clause AND LGPL-2.1-or-later AND SUSE-TeX
Group:          Development/Languages/Other
URL:            https://www.tug.org/texlive/
Requires:       texlive-kpathsea-devel = @@KPSEVERSION@@
Requires:       texlive-ptexenc-devel = @@PTEXENCVERSION@@
Requires:       texlive-synctex-devel = @@SYNCTEXVERSION@@
Requires:       texlive-texlua-devel = @@TEXLUAVERSION53@@
%if %{with LuaJIT}
Requires:       texlive-texluajit-devel = @@TEXLUAJITVERSION@@
%endif
Requires:       texlive-bin-devel >= %{texlive_version}
Requires:       texlive-cweb >= %{texlive_version}
Requires:       texlive-web >= %{texlive_version}

%description -n texlive-devel
This package will cause the installation of several
development packages for TeXLive.

%package -n texlive-alldocumentation
Version:        %{texlive_version}.%{texlive_noarch}
Release:        0
Summary:        Attract all documentations of installed TeXLive packages
License:        BSD-3-Clause AND LGPL-2.1-or-later AND SUSE-TeX
Group:          Documentation/Other
URL:            https://www.tug.org/texlive/

%description -n texlive-alldocumentation
This package will attract all the documentation packages of any
already installed TeXLive package.

%package -n texlive-extratools
Version:        %{texlive_version}.%{texlive_noarch}
Release:        0
Summary:        Utilities like DviToDvi, PSToPS, and LaCheck
License:        GPL-2.0-or-later AND LPPL-1.0 AND LGPL-2.1-or-later
Group:          Productivity/Publishing/TeX/Base
URL:            https://www.tug.org/texlive/
Obsoletes:      texlive-tools <= %{texlive_previous}
Requires:       psutils
Requires:       texlive-dviasm >= %{texlive_version}
Requires:       texlive-dvidvi >= %{texlive_version}
Requires:       texlive-dvipng >= %{texlive_version}
Requires:       texlive-dvisvgm >= %{texlive_version}
Requires:       texlive-lacheck >= %{texlive_version}
Requires:       texlive-seetexk >= %{texlive_version}

%description -n texlive-extratools
The LaCheck utility is a syntax checker for LaTeX documents.

The DviToDvi utilities are

dvibook       rearranges pages into book signatures, adds blank pages
              as needed
dviselect     selects pages and page ranges
dvitodvi      performs general page rearrangement of selected pages
dviconcat     concatenation of DVI files

Three simple scripts for scaling DIN A4 pages and rearranging two by
two onto a DIN A4 page (a4toa5) are included. The number of pages must
be even (which can be done by odd2even or dvibook).

%prep
pushd %_sourcedir
    chmod g-w *.tar.xz
popd
%setup -c -q -n %name -T

%build

%install
    mkdir -p %{buildroot}%{_texmfdistdir}/fonts/map/dvipdfmx/updmap
    mkdir -p %{buildroot}%{_texmfdistdir}/fonts/map/dvips/updmap
    mkdir -p %{buildroot}%{_texmfdistdir}/fonts/map/pdftex/updmap
    mkdir -p %{buildroot}%{_bindir}
    mkdir -p %{buildroot}%{_libdir}
    mkdir -p %{buildroot}%{_includedir}
    mkdir -p %{buildroot}%{_infodir}
    mkdir -p %{buildroot}%{_libexecdir}/mktex
    mkdir -p %{buildroot}%{_mandir}
    mkdir -p %{buildroot}%{_mandir}/man1
    mkdir -p %{buildroot}%{_mandir}/man5
    mkdir -p %{buildroot}%{_mandir}/man8
    mkdir -p %{buildroot}%{_texmfmaindir}/tlpkg/TeXLive
    mkdir -p %{buildroot}%{_texmfdistdir}/tlpkg/TeXLive
    mkdir -p %{buildroot}%{_texmfmaindir}/tlpkg/tlpostcode
    mkdir -p %{buildroot}%{_texmfconfdir}/dvipdfm/config
    mkdir -p %{buildroot}%{_texmfconfdir}/dvipdfmx
    mkdir -p %{buildroot}%{_texmfconfdir}/dvips/config
    mkdir -p %{buildroot}%{_texmfconfdir}/scripts/urlbst
    mkdir -p %{buildroot}%{_texmfconfdir}/scripts/match_parens
    mkdir -p %{buildroot}%{_texmfconfdir}/scripts/mf2pt1
    mkdir -p %{buildroot}%{_texmfconfdir}/tex/amstex/base
    mkdir -p %{buildroot}%{_texmfconfdir}/tex/generic/config
    mkdir -p %{buildroot}%{_texmfconfdir}/tex/generic/tex-ini-files
    mkdir -p %{buildroot}%{_texmfconfdir}/tex/lambda/config
    mkdir -p %{buildroot}%{_texmfconfdir}/tex/mex/base
    mkdir -p %{buildroot}%{_texmfconfdir}/tex/plain/cyrplain
    mkdir -p %{buildroot}%{_texmfconfdir}/web2c
    mkdir -p %{buildroot}%{_texmfconfdir}/xdvi
    mkdir -p %{buildroot}%{_texmfdistdir}/tex/generic/config/language.splits
    mkdir -p %{buildroot}%{_texmfdistdir}/scripts/m-tx
    mkdir -p %{buildroot}%{_texmfdistdir}/scripts/pmx
    mkdir -p %{buildroot}%{_texmfmaindir}/scripts/texlive
    mkdir -p %{buildroot}%{_texmfvardir}
    mkdir -p %{buildroot}%{_texmfvardir}/dist
    mkdir -p %{buildroot}%{_texmfvardir}/fonts
    mkdir -p %{buildroot}%{_texmfvardir}/fonts/dvipdfm
    mkdir -p %{buildroot}%{_texmfvardir}/fonts/dvips
    mkdir -p %{buildroot}%{_texmfvardir}/fonts/pdftex
    mkdir -p %{buildroot}%{_texmfvardir}/main
    mkdir -p %{buildroot}%{_texmfvardir}/md5
    mkdir -p %{buildroot}%{_texmfvardir}/web2c
    mkdir -p %{buildroot}%{_texmfvardir}/web2c/aleph
    mkdir -p %{buildroot}%{_texmfvardir}/web2c/eptex
    mkdir -p %{buildroot}%{_texmfvardir}/web2c/luatex
    mkdir -p %{buildroot}%{_texmfvardir}/web2c/metafont
    mkdir -p %{buildroot}%{_texmfvardir}/web2c/pdftex
    mkdir -p %{buildroot}%{_texmfvardir}/web2c/ptex
    mkdir -p %{buildroot}%{_texmfvardir}/web2c/tex
    mkdir -p %{buildroot}%{_texmfvardir}/web2c/xetex
    mkdir -p %{buildroot}%{_texmfcache}
    mkdir -p %{buildroot}%{_fontcache}
    mkdir -p %{buildroot}%{_fontcache}/pk
    mkdir -p %{buildroot}%{_fontcache}/source
    mkdir -p %{buildroot}%{_fontcache}/tfm
    mkdir -p %{buildroot}%{_appdefdir}
    mkdir -p %{buildroot}%{_sysconfdir}/permissions.d
@@TEXMFTREE@@
    mkdir -p %{buildroot}%{_datadir}/texlive
    ln -sf ../../share/texmf %{buildroot}%{_datadir}/texlive/texmf-dist
    ln -sf ../../lib/texmf   %{buildroot}%{_datadir}/texlive/texmf
@@INSTALL@@
    rm -v  %{buildroot}%{_datadir}/texlive/texmf
    rm -v  %{buildroot}%{_datadir}/texlive/texmf-dist
    rm -vr %{buildroot}%{_datadir}/texlive

    # clear out all file below texmf tree as this will delivered by texlive tar balls
    find %{buildroot}%{_texmfdirs} -type f | xargs -r rm -vf

    # the ls-R file (empty at package time)
    for dir in	%{_texmfconfdir}	\
		%{_fontcache}		\
		%{_texmfvardir}		\
		%{_texmfvardir}/dist	\
		%{_texmfvardir}/main
    do
	echo '%% ls-R -- filename database for kpathsea; do not change this line.' > \
	%{buildroot}${dir}/ls-R
	chmod 0664 %{buildroot}${dir}/ls-R
    done
    ln -sf %{_texmfvardir}/dist/ls-R %{buildroot}%{_texmfdistdir}/
    ln -sf %{_texmfvardir}/main/ls-R %{buildroot}%{_texmfmaindir}/
    pushd %{buildroot}%{_texmfdistdir}/
	ls -RLA ./ 2>/dev/null >> %{buildroot}%{_texmfvardir}/dist/ls-R || true
    popd
    pushd %{buildroot}%{_texmfmaindir}/
	ls -RLA ./ 2>/dev/null >> %{buildroot}%{_texmfvardir}/main/ls-R || true
    popd

    (cat > %{buildroot}%{_texmfdistdir}/fonts/map/dvipdfmx/updmap/kanjix.map) <<-'EOF'
	% maintained by updmap[-sys] (multi).
	% Don't change this file directly. Use updmap[-sys] instead.
	% See the updmap documentation.
	% A log of the run that created this file is available here:
	% /tmp/umap-var/web2c/updmap.log
	EOF
    for cfg in builtin35 download35 ps2pk psfonts psfonts_pk psfonts_t1
    do
	(cat > %{buildroot}%{_texmfdistdir}/fonts/map/dvips/updmap/${cfg}.map) <<-'EOF'
	% maintained by updmap[-sys] (multi).
	% Don't change this file directly. Use updmap[-sys] instead.
	% See the updmap documentation.
	% A log of the run that created this file is available here:
	% /tmp/umap-var/web2c/updmap.log
	EOF
    done
    for cfg in pdftex pdftex_dl14 pdftex_ndl14
    do
	(cat > %{buildroot}%{_texmfdistdir}/fonts/map/pdftex/updmap/${cfg}.map) <<-'EOF'
	% maintained by updmap[-sys] (multi).
	% Don't change this file directly. Use updmap[-sys] instead.
	% See the updmap documentation.
	% A log of the run that created this file is available here:
	% /tmp/umap-var/web2c/updmap.log
	EOF
    done

    # the permission files, any change is also required within do.mklists
    # Note: the entry for the public program is set to
    #   %{_libexecdir}/mktex/publici    root:%{texgrp}  2755
    # in the standard global permission files
    mkdir -p %{buildroot}%{_sysconfdir}/permissions.d
    (cat > %{buildroot}%{_sysconfdir}/permissions.d/texlive.texlive) <<-EOF
	%{_texmfconfdir}/ls-R		root:%{texgrp}	0664
	%{_fontcache}/ls-R	   %{texusr}:%{texgrp}	0664
	%{_texmfvardir}/ls-R		root:%{texgrp}	0664
	%{_texmfvardir}/dist/ls-R	root:%{texgrp}	0664
	%{_texmfvardir}/main/ls-R	root:%{texgrp}	0664
	%{_texmfvardir}/		root:root	1755
	%{_texmfvardir}/dist/		root:root	1755
	%{_texmfvardir}/main/		root:root	1755
	%{_texmfvardir}/fonts/		root:root	1755
	%{_texmfvardir}/fonts/dvipdfm/	root:root	1755
	%{_texmfvardir}/fonts/dvips/	root:root	1755
	%{_texmfvardir}/fonts/pdftex/	root:root	1755
	%{_texmfcache}/			root:root	1755
	%{_fontcache}/		   %{texusr}:%{texgrp}	3775
	%{_fontcache}/pk/	   %{texusr}:%{texgrp}	3775
	%{_fontcache}/source/	   %{texusr}:%{texgrp}	3775
	%{_fontcache}/tfm/	   %{texusr}:%{texgrp}	3775
	EOF
    (cat > %{buildroot}%{_sysconfdir}/permissions.d/texlive) <<-EOF
	%{_texmfconfdir}/ls-R		root:%{texgrp}	0664
	%{_fontcache}/ls-R	   %{texusr}:%{texgrp}	0664
	%{_texmfvardir}/ls-R		root:%{texgrp}	0664
	%{_texmfvardir}/dist/ls-R	root:%{texgrp}	0664
	%{_texmfvardir}/main/ls-R	root:%{texgrp}	0664
	%{_texmfvardir}/		root:root	1755
	%{_texmfvardir}/dist/		root:root	1755
	%{_texmfvardir}/main/		root:root	1755
	%{_texmfvardir}/fonts/		root:root	1755
	%{_texmfvardir}/fonts/dvipdfm/	root:root	1755
	%{_texmfvardir}/fonts/dvips/	root:root	1755
	%{_texmfvardir}/fonts/pdftex/	root:root	1755
	%{_texmfcache}/			root:root	1755
	%{_fontcache}/		   %{texusr}:%{texgrp}	3775
	%{_fontcache}/pk/	   %{texusr}:%{texgrp}	3775
	%{_fontcache}/source/	   %{texusr}:%{texgrp}	3775
	%{_fontcache}/tfm/	   %{texusr}:%{texgrp}	3775
	EOF

%if %{with zypper_posttrans}
    sed -r 's@%%\{_texmfdistdir\}@%{_texmfdistdir}@' < %{S:42} > %{buildroot}%{_texmfdistdir}/texconfig/zypper.py
    mkdir -p %{buildroot}/var/adm/update-scripts
    ln -sf %{_texmfdistdir}/texconfig/zypper.py \
        %{buildroot}/var/adm/update-scripts/%{name}-%{version}-%{release}-zypper
%endif

    # enviroment
    mkdir -p %{buildroot}%{_sysconfdir}/profile.d
    install -m 0644 %{S:13} %{buildroot}%{_sysconfdir}/profile.d/
    install -m 0644 %{S:14} %{buildroot}%{_sysconfdir}/profile.d/

    mkdir -p %{buildroot}%{_datadir}/fontconfig/conf.avail

    install -m 0644 %{S:15} %{buildroot}%{_datadir}/fontconfig/conf.avail/09-texlive.conf
    install -m 0644 %{S:16} %{buildroot}%{_datadir}/fontconfig/conf.avail/09-texlive-type1.conf
    install -m 0644 %{S:17} %{buildroot}%{_datadir}/fontconfig/conf.avail/09-texlive-truetype.conf

    mkdir -p %{buildroot}%{_sysconfdir}/skel
    install -m 0644 %{S:31} %{buildroot}%{_sysconfdir}/skel/.dvipsrc

    # install config stuff
    mkdir -p %{buildroot}%{_fillupdir}
    install -m 0644 %{S:10} %{buildroot}%{_fillupdir}/sysconfig.texlive

    install -m 0755 %{S:11} %{buildroot}%{_texmfdistdir}/texconfig/update
%if 0%{?suse_version} > 1550
    install -m 0755 %{S:12} %{buildroot}%{_texmfdistdir}/texconfig/daily
    mkdir -p %{buildroot}%{_unitdir}
    install -m 0644 %{S:18} %{buildroot}%{_unitdir}/texlive.timer
    install -m 0644 %{S:19} %{buildroot}%{_unitdir}/texlive.service
    install -m 0644 %{S:20} %{buildroot}%{_unitdir}/texlive-initial.service
%else
    mkdir -p %{buildroot}%{_sysconfdir}/cron.daily
    install -m 0755 %{S:12} %{buildroot}%{_sysconfdir}/cron.daily/suse-texlive
%endif

%if %{defined verify_permissions}
%verifyscript
%verify_permissions -e %{_texmfconfdir}/ls-R
%verify_permissions -e %{_texmfvardir}/
%verify_permissions -e %{_texmfvardir}/fonts/
%verify_permissions -e %{_texmfvardir}/fonts/dvipdfm/
%verify_permissions -e %{_texmfvardir}/fonts/dvips/
%verify_permissions -e %{_texmfvardir}/fonts/ls-R
%verify_permissions -e %{_texmfvardir}/fonts/pdftex/
%verify_permissions -e %{_texmfvardir}/dist/
%verify_permissions -e %{_texmfvardir}/dist/ls-R
%verify_permissions -e %{_texmfvardir}/ls-R
%verify_permissions -e %{_texmfvardir}/main/
%verify_permissions -e %{_texmfvardir}/main/ls-R
%verify_permissions -e %{_texmfcache}/
%verify_permissions -e %{_fontcache}/
%verify_permissions -e %{_fontcache}/ls-R
%verify_permissions -e %{_fontcache}/pk/
%verify_permissions -e %{_fontcache}/source/
%verify_permissions -e %{_fontcache}/tfm/
%endif

%pre
# the ls-R file on update
for dir in	%{_texmfconfdir}	\
		%{_fontcache}		\
		%{_texmfvardir}		\
		%{_texmfvardir}/dist	\
		%{_texmfvardir}/main
do
    rm -f ${dir}/ls-R
done
%if 0%{?suse_version} > 1550
%service_add_pre texlive.timer texlive.service texlive-initial.service
%endif

%post
%fillup_only -n texlive
# the ls-R file (empty at package time)
error=0
user=
for dir in	%{_texmfconfdir}	\
		%{_fontcache}		\
		%{_texmfvardir}		\
		%{_texmfvardir}/dist	\
		%{_texmfvardir}/main
do
    test "$dir" = %{_fontcache} && user=%{texusr} || user=root
    setpriv --reuid $user --regid %{texgrp} --init-groups /bin/sh -ec "
	tmp=\$(mktemp ${dir}/ls-R.XXXXXX)
	chmod 0664 \${tmp}
	echo '%% ls-R -- filename database for kpathsea; do not change this line.' > \${tmp}
	mv \${tmp} ${dir}/ls-R" || error=1
done
%if %{defined set_permissions}
%set_permissions %{_texmfconfdir}/ls-R
%set_permissions %{_texmfvardir}/
%set_permissions %{_texmfvardir}/fonts/
%set_permissions %{_texmfvardir}/fonts/dvipdfm/
%set_permissions %{_texmfvardir}/fonts/dvips/
%set_permissions %{_texmfvardir}/fonts/ls-R
%set_permissions %{_texmfvardir}/fonts/pdftex/
%set_permissions %{_texmfvardir}/dist/
%set_permissions %{_texmfvardir}/dist/ls-R
%set_permissions %{_texmfvardir}/ls-R
%set_permissions %{_texmfvardir}/main/
%set_permissions %{_texmfvardir}/main/ls-R
%set_permissions %{_texmfcache}/
%set_permissions %{_fontcache}/
%set_permissions %{_fontcache}/ls-R
%set_permissions %{_fontcache}/pk/
%set_permissions %{_fontcache}/source/
%set_permissions %{_fontcache}/tfm/
%endif
%if 0%{?suse_version} > 1550
%service_add_post texlive.timer texlive.service texlive-initial.service
%endif
mkdir -p /var/run/texlive
> /var/run/texlive/run-mktexlsr
> /var/run/texlive/run-update
test $error = 0 || exit 1

%preun
%if 0%{?suse_version} > 1550
%service_del_preun texlive.timer texlive.service texlive-initial.service
%endif

%postun
%if 0%{?suse_version} > 1550
%service_del_postun texlive.timer texlive.service texlive-initial.service
%endif
if test $1 = 1; then
    mkdir -p /var/run/texlive
    > /var/run/texlive/run-mktexlsr
    > /var/run/texlive/run-update
fi

%posttrans
%if %{with zypper_posttrans}
test -z "$ZYPP_IS_RUNNING" || exit 0
%endif
test -d /var/run/texlive || exit 0
VERBOSE=false %{_texmfdistdir}/texconfig/update || :

%files
%if 0%{?suse_version} <= 1550
%config %{_sysconfdir}/cron.daily/suse-texlive
%endif
%config %{_sysconfdir}/permissions.d/texlive*
%config %{_sysconfdir}/profile.d/texlive*
%config %{_sysconfdir}/skel/.dvipsrc
%{_datadir}/fontconfig/conf.avail/09-texlive*.conf
%dir %{_libexecdir}/mktex
%dir %{_texmfconfdir}
%dir %{_texmfconfdir}/dvipdfm
%dir %{_texmfconfdir}/dvipdfm/config
%dir %{_texmfconfdir}/dvipdfmx
%dir %{_texmfconfdir}/dvips
%dir %{_texmfconfdir}/dvips/config
%dir %{_texmfconfdir}/scripts
%dir %{_texmfconfdir}/scripts/urlbst
%dir %{_texmfconfdir}/scripts/match_parens
%dir %{_texmfconfdir}/scripts/mf2pt1
%dir %{_texmfconfdir}/tex
%dir %{_texmfconfdir}/tex/amstex
%dir %{_texmfconfdir}/tex/amstex/base
%dir %{_texmfconfdir}/tex/generic
%dir %{_texmfconfdir}/tex/generic/config
%dir %{_texmfconfdir}/tex/generic/tex-ini-files
%dir %{_texmfconfdir}/tex/lambda
%dir %{_texmfconfdir}/tex/lambda/config
%dir %{_texmfconfdir}/tex/mex
%dir %{_texmfconfdir}/tex/mex/base
%dir %{_texmfconfdir}/tex/plain
%dir %{_texmfconfdir}/tex/plain/cyrplain
%dir %{_texmfconfdir}/web2c
%dir %{_texmfconfdir}/xdvi
%dir %{_texmfmaindir}
%dir %{_texmfdistdir}/web2c
%dir %{_texmfdistdir}/chktex
%dir %{_texmfdistdir}/doc
%dir %{_texmfdistdir}/doc/chktex
%dir %{_texmfdistdir}/doc/bibtex8
%dir %{_texmfdistdir}/tex/generic/config/language.splits
%dir %{_texmfdistdir}/scripts
%dir %{_texmfdistdir}/scripts/chktex
%dir %{_texmfdistdir}/scripts/ps2eps
%dir %{_texmfdistdir}/scripts/simpdftex
%dir %{_texmfdistdir}/scripts/a2ping
%dir %{_texmfdistdir}/scripts/texdoc
%dir %{_texmfdistdir}/scripts/texlive
%dir %{_texmfdistdir}/hbf2gf
%dir %{_texmfdistdir}/fonts
%dir %{_texmfdistdir}/fonts/cmap
%dir %{_texmfdistdir}/fonts/cmap/dvipdfmx
%dir %{_texmfdistdir}/fonts/map
%dir %{_texmfdistdir}/fonts/map/dvipdfmx
%dir %{_texmfdistdir}/dvipdfmx
%dir %{_texmfdistdir}/dvips
%dir %{_texmfdistdir}/dvips/base
%dir %{_texmfdistdir}/dvips/gsftopk
%dir %{_texmfdistdir}/xdvi
%dir %{_texmfdistdir}/xdvi/pixmap
%dir %{_texmfdistdir}/texconfig
%attr(0755,root,root) %{_texmfdistdir}/texconfig/update
%if 0%{?suse_version} > 1550
%attr(0755,root,root) %{_texmfdistdir}/texconfig/daily
%{_unitdir}/texlive.timer
%{_unitdir}/texlive.service
%{_unitdir}/texlive-initial.service
%endif
%if %{with zypper_posttrans}
%attr(0755,root,root) %{_texmfdistdir}/texconfig/zypper.py
%endif
%dir %{_texmfdistdir}/asymptote
%dir %{_texmfdistdir}/asymptote/GUI
%dir %{_texmfdistdir}
%dir %{_texmfdistdir}/tlpkg
%dir %{_texmfdistdir}/tlpkg/TeXLive
%dir %{_texmfdistdir}/tlpkg/tlpostcode
%dir %{_texmfdistdir}/bibtex
%dir %{_texmfdistdir}/bibtex/csf
%dir %{_texmfdistdir}/bibtex/csf/base
%dir %{_texmfdistdir}/fonts
%dir %{_texmfdistdir}/fonts/map
%dir %{_texmfdistdir}/fonts/map/glyphlist
%dir %{_texmfdistdir}/scripts
%dir %{_texmfdistdir}/scripts/tex4ht
%dir %{_texmfdistdir}/scripts/bibexport
%dir %{_texmfdistdir}/scripts/listings-ext
%dir %{_texmfdistdir}/scripts/pdfjam
%dir %{_texmfdistdir}/scripts/pst-pdf
%dir %{_texmfdistdir}/scripts/accfonts
%dir %{_texmfdistdir}/scripts/authorindex
%dir %{_texmfdistdir}/scripts/bundledoc
%dir %{_texmfdistdir}/scripts/cachepic
%dir %{_texmfdistdir}/scripts/context
%dir %{_texmfdistdir}/scripts/context/perl
%dir %{_texmfdistdir}/scripts/de-macro
%dir %{_texmfdistdir}/scripts/dviasm
## %dir %{_texmfdistdir}/scripts/ebong
%dir %{_texmfdistdir}/scripts/epspdf
%dir %{_texmfdistdir}/scripts/epstopdf
%dir %{_texmfdistdir}/scripts/fig4latex
%dir %{_texmfdistdir}/scripts/findhyph
%dir %{_texmfdistdir}/scripts/fontools
%dir %{_texmfdistdir}/scripts/fragmaster
%dir %{_texmfdistdir}/scripts/glossaries
%dir %{_texmfdistdir}/scripts/latex2man
%dir %{_texmfdistdir}/scripts/latexdiff
%dir %{_texmfdistdir}/scripts/latexmk
%dir %{_texmfdistdir}/scripts/luaotfload
%dir %{_texmfdistdir}/scripts/mathspic
%dir %{_texmfdistdir}/scripts/mkjobtexmf
%dir %{_texmfdistdir}/scripts/mkgrkindex
%dir %{_texmfdistdir}/scripts/m-tx
%dir %{_texmfdistdir}/scripts/musixtex
%dir %{_texmfdistdir}/scripts/pax
%dir %{_texmfdistdir}/scripts/pdfcrop
%dir %{_texmfdistdir}/scripts/perltex
%dir %{_texmfdistdir}/scripts/pkfix
%dir %{_texmfdistdir}/scripts/pkfix-helper
%dir %{_texmfdistdir}/scripts/pmx
%dir %{_texmfdistdir}/scripts/pst2pdf
%dir %{_texmfdistdir}/scripts/purifyeps
%dir %{_texmfdistdir}/scripts/splitindex
%dir %{_texmfdistdir}/scripts/sty2dtx
%dir %{_texmfdistdir}/scripts/svn-multi
%dir %{_texmfdistdir}/scripts/texcount
%dir %{_texmfdistdir}/scripts/texdef
%dir %{_texmfdistdir}/scripts/texdiff
%dir %{_texmfdistdir}/scripts/texdirflatten
%dir %{_texmfdistdir}/scripts/texloganalyser
%dir %{_texmfdistdir}/scripts/thumbpdf
%dir %{_texmfdistdir}/scripts/ulqda
%dir %{_texmfdistdir}/scripts/vpe
%dir %{_x11data}
%dir %{_x11data}/app-defaults
@@TEXMFTREE@@
%dir %attr(1755,root,root) %{_texmfvardir}/
%dir %attr(1755,root,root) %{_texmfvardir}/dist/
%dir %attr(1755,root,root) %{_texmfvardir}/main/
%dir %attr(1755,root,root) %{_texmfvardir}/fonts/
%dir %attr(1755,root,root) %{_texmfvardir}/fonts/dvipdfm/
%dir %attr(1755,root,root) %{_texmfvardir}/fonts/dvips/
%dir %attr(1755,root,root) %{_texmfvardir}/fonts/pdftex/
%dir %attr(1755,root,root) %{_texmfvardir}/web2c/
%dir %attr(1755,root,root) %{_texmfvardir}/web2c/aleph/
%dir %attr(1755,root,root) %{_texmfvardir}/web2c/eptex/
%dir %attr(1755,root,root) %{_texmfvardir}/web2c/luatex/
%dir %attr(1755,root,root) %{_texmfvardir}/web2c/metafont/
%dir %attr(1755,root,root) %{_texmfvardir}/web2c/pdftex/
%dir %attr(1755,root,root) %{_texmfvardir}/web2c/ptex/
%dir %attr(1755,root,root) %{_texmfvardir}/web2c/tex/
%dir %attr(1755,root,root) %{_texmfvardir}/web2c/xetex/
%dir %attr(1755,root,root) %{_texmfcache}/
%dir %attr(3775,%{texusr},%{texgrp}) %verify(not mode) %{_fontcache}/
%dir %attr(3775,%{texusr},%{texgrp}) %verify(not mode) %{_fontcache}/pk/
%dir %attr(3775,%{texusr},%{texgrp}) %verify(not mode) %{_fontcache}/source/
%dir %attr(3775,%{texusr},%{texgrp}) %verify(not mode) %{_fontcache}/tfm/
%dir %{_texmfvardir}/md5
%verify(link) %{_texmfmaindir}/ls-R
%verify(link) %{_texmfdistdir}/ls-R
%ghost %config(noreplace) %attr(0664,root,%{texgrp}) %verify(not md5 size mtime mode) %{_texmfconfdir}/ls-R
%ghost %config(noreplace) %attr(0664,%{texusr},%{texgrp}) %verify(not md5 size mtime mode) %{_fontcache}/ls-R
%ghost %config(noreplace) %attr(0664,root,%{texgrp}) %verify(not md5 size mtime mode) %{_texmfvardir}/ls-R
%ghost %config(noreplace) %attr(0664,root,%{texgrp}) %verify(not md5 size mtime mode) %{_texmfvardir}/dist/ls-R
%ghost %config(noreplace) %attr(0664,root,%{texgrp}) %verify(not md5 size mtime mode) %{_texmfvardir}/main/ls-R
%{_fillupdir}/sysconfig.texlive
%if %{with zypper_posttrans}
/var/adm/update-scripts/%{name}-%{version}-%{release}-zypper
%endif

@@FILES@@

%files -n texlive-devel

%files -n texlive-alldocumentation

%files -n texlive-extratools

%files -n texlive-updmap-map
%dir %{_texmfdistdir}/fonts/map/dvipdfmx/updmap
%dir %{_texmfdistdir}/fonts/map/dvips/updmap
%dir %{_texmfdistdir}/fonts/map/pdftex/updmap
%{_texmfdistdir}/fonts/map/dvipdfmx/updmap/kanjix.map
%{_texmfdistdir}/fonts/map/dvips/updmap/builtin35.map
%{_texmfdistdir}/fonts/map/dvips/updmap/download35.map
%{_texmfdistdir}/fonts/map/dvips/updmap/ps2pk.map
%{_texmfdistdir}/fonts/map/dvips/updmap/psfonts.map
%{_texmfdistdir}/fonts/map/dvips/updmap/psfonts_pk.map
%{_texmfdistdir}/fonts/map/dvips/updmap/psfonts_t1.map
%{_texmfdistdir}/fonts/map/pdftex/updmap/pdftex.map
%{_texmfdistdir}/fonts/map/pdftex/updmap/pdftex_dl14.map
%{_texmfdistdir}/fonts/map/pdftex/updmap/pdftex_ndl14.map
%if %{with zypper_posttrans}
/var/adm/update-scripts/texlive-updmap-map-%{texlive_version}.%{texlive_noarch}.svn54495-%{release}-zypper
%endif

%changelog
openSUSE Build Service is sponsored by