File texlive-specs-j.spec of Package texlive-specs-j

# spec file for package texlive-specs-j
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 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

%define build_slice j
%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 'check-la|boot-scripts|rpath|symlink|desktop|strip-debug|gcc-output|debuginfo|libtool|kernel-log') %{nil}
# skip-check-libtool-deps
%if 0%{?_with_debug:1}
%define __debug_install_post : > %{_builddir}/%{?buildsubdir}/debugfiles.list
%define debug_package %{nil}

# skip-check-libtool-deps
Name:           texlive-specs-j
Version:        2012
Release:        0
Summary:        One spec file for all TeX Live packages
License:        BSD-3-Clause and GPL-2.0+ and LPPL-1.0 and SUSE-Public-Domain
Group:          Development/Tools/Building
Source0:        texlive-specs.tar.xz
Source1000:     jablantile.doc.tar.xz
Source1001:     jablantile.tar.xz
Source1002:     jadetex.doc.tar.xz
Source1003:     jadetex.requires
Source1004:     jadetex.tar.xz
Source1005:     jadetex_ini.dif
Source1006:     jamtimes.doc.tar.xz
Source1007:     jamtimes.tar.xz
Source1008:     japanese-otf-uptex.doc.tar.xz
Source1009:     japanese-otf-uptex.tar.xz
Source1010:     japanese-otf.doc.tar.xz
Source1011:     japanese-otf.tar.xz
Source1012:     japanese.doc.tar.xz
Source1013:     japanese.tar.xz
Source1014:     jfontmaps.doc.tar.xz
Source1015:     jfontmaps.tar.xz
Source1016:     jknapltx.doc.tar.xz
Source1017:     jknapltx.tar.xz
Source1018:     jlabels.doc.tar.xz
Source1019:     jlabels.tar.xz
Source1020:     jmlr.doc.tar.xz
Source1021:     jmlr.tar.xz
Source1022:     jmn.tar.xz
Source1023:     jneurosci.doc.tar.xz
Source1024:     jneurosci.tar.xz
Source1025:     jpsj.doc.tar.xz
Source1026:     jpsj.tar.xz
Source1027:     js-misc.doc.tar.xz
Source1028:     js-misc.tar.xz
Source1029:     jsclasses.doc.tar.xz
Source1030:     jsclasses.tar.xz
Source1031:     junicode.doc.tar.xz
Source1032:     junicode.tar.xz
Source1033:     jura.doc.tar.xz
Source1034:     jura.tar.xz
Source1035:     juraabbrev.doc.tar.xz
Source1036:     juraabbrev.tar.xz
Source1037:     jurabib.doc.tar.xz
Source1038:     jurabib.tar.xz
Source1039:     juramisc.doc.tar.xz
Source1040:     juramisc.tar.xz
Source1041:     jurarsp.doc.tar.xz
Source1042:     jurarsp.tar.xz
Source1043:     jvlisting.doc.tar.xz
Source1044:     jvlisting.tar.xz
NoSource:       1000
NoSource:       1001
NoSource:       1002
NoSource:       1004
NoSource:       1005
NoSource:       1006
NoSource:       1007
NoSource:       1008
NoSource:       1009
NoSource:       1010
NoSource:       1011
NoSource:       1012
NoSource:       1013
NoSource:       1014
NoSource:       1015
NoSource:       1016
NoSource:       1017
NoSource:       1018
NoSource:       1019
NoSource:       1020
NoSource:       1021
NoSource:       1022
NoSource:       1023
NoSource:       1024
NoSource:       1025
NoSource:       1026
NoSource:       1027
NoSource:       1028
NoSource:       1029
NoSource:       1030
NoSource:       1031
NoSource:       1032
NoSource:       1033
NoSource:       1034
NoSource:       1035
NoSource:       1036
NoSource:       1037
NoSource:       1038
NoSource:       1039
NoSource:       1040
NoSource:       1041
NoSource:       1042
NoSource:       1043
NoSource:       1044
BuildRequires:  buffer
BuildRequires:  ed
BuildRequires:  file
BuildRequires:  fontconfig
BuildRequires:  ghostscript-fonts-std
BuildRequires:  mkfontdir
BuildRequires:  mkfontscale
BuildRequires:  texlive-filesystem
BuildConflicts: texinfo
BuildRequires:  xorg-x11-fonts-core
BuildRequires:  xz
BuildArch:      noarch

Use one rpm spec file for repackaging the texmf/texmf-dist
the several tar balls of TeX Live. 

pushd %_sourcedir
    chmod g-w *.tar.xz
%setup -n texlive-specs -q
(cat > Makefile)<<'EOF'
 topdir=$(abspath ../..)
 SHELL := /bin/bash

%%.rpm: root=$(rootdir)/$*.noarch
%%.rpm: %%.spec
	exec > >(exec buffer -s 256k -m 1m -u 10) 2>&1; \
	rpmbuild -ba --buildroot $(root) --define '_srcdefattr (-,root,root)' --define 'rlobs %release' %{?disturl:--define 'disturl %disturl'} $< && \
	rm -rf $(topdir)/BUILD/$*-[0-9]*

%if %{defined build_slice}
specs := $(foreach spec,%build_slice,$(wildcard texlive-$(spec)*.spec))
specs := $(sort $(filter-out texlive-specs.specs,$(wildcard *.spec)))
rpms := $(specs:.spec=.rpm)

all: $(rpms)
make topdir=%{_topdir} %{?_smp_mflags}