]> git.pld-linux.org Git - packages/fonts-TTF-microsoft-tahoma.git/blob - fonts-TTF-microsoft-tahoma.spec
- bcond header cleanup
[packages/fonts-TTF-microsoft-tahoma.git] / fonts-TTF-microsoft-tahoma.spec
1 #
2 # Conditional build:
3 %bcond_with     license_agreement       # generates package (may require Windows license?)
4 #
5 Summary:        Microsoft Tahoma True Type font
6 Summary(pl):    Font True Type Tahoma firmy Microsoft
7 %define         base_name               fonts-TTF-microsoft-tahoma
8 %if %{with license_agreement}
9 Name:           %{base_name}
10 %else
11 Name:           %{base_name}-installer
12 %endif
13 Version:        20020525
14 Release:        1%{?with_license_agreement:wla}
15 # part of IE update - may require Windows license to use
16 License:        ?
17 Group:          Fonts
18 %if %{with license_agreement}
19 # also at http://dl.sourceforge.net/corefonts/
20 Source0:        http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/EN-US/IELPKTH.CAB
21 # NoSource0-md5: 358584cddb75ac90472c25f01b308ebe
22 BuildRequires:  cabextract
23 Requires:       %{_fontsdir}/TTF
24 Requires(post,postun):  fontpostinst
25 %else
26 Requires:       cabextract
27 Requires:       rpm-build-tools
28 Requires:       wget
29 %endif
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %define         ttffontsdir     %{_fontsdir}/TTF
34
35 %description
36 Microsoft Tahoma True Type font.
37 %if ! %{with license_agreement}
38 License issues made us not to include inherent files into this package
39 by default (it probably requires Windows license). If you want to
40 create full working package please build it with one of the following
41 command:
42
43 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
44 %{base_name}.install --with license_agreement ftp://ftp.pld-linux.org/dists/ac/PLD/<your_arch>/PLD/RPMS/%{base_name}-{version}-{release}.src.rpm
45 %endif
46
47 %description -l pl
48 Font True Type Tahoma firmy Microsoft.
49 %if ! %{with license_agreement}
50 Kwestie licencji zmusi³y nas do niedo³±czania do tego pakietu istotnych
51 plików (prawdopodobnie wymaga licencji na Windows). Je¶li chcesz stworzyæ
52 w pe³ni funkcjonalny pakiet, zbuduj go za pomoc± polecenia:
53
54 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
55 %{base_name}.install --with license_agreement ftp://ftp.pld-linux.org/dists/ac/PLD/<your_arch>/PLD/RPMS/%{base_name}-{version}-{release}.src.rpm
56 %endif
57
58 %prep
59 %if %{with license_agreement}
60 %setup -q -c -T
61 /usr/bin/cabextract -L %{SOURCE0}
62 %endif
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66 %if ! %{with license_agreement}
67 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
68
69 cat <<EOF >$RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
70 #!/bin/sh
71 if [ "\$1" = "--with" -a "\$2" = "license_agreement" ]
72 then
73         TMPDIR=\`rpm --eval "%%{tmpdir}"\`; export TMPDIR
74         SPECDIR=\`rpm --eval "%%{_specdir}"\`; export SPECDIR
75         SRPMDIR=\`rpm --eval "%%{_srcrpmdir}"\`; export SRPMDIR
76         SOURCEDIR=\`rpm --eval "%%{_sourcedir}"\`; export SOURCEDIR
77         BUILDDIR=\`rpm --eval "%%{_builddir}"\`; export BUILDDIR
78         RPMDIR=\`rpm --eval "%%{_rpmdir}"\`; export RPMDIR
79         BACKUP_SPEC=0
80         mkdir -p \$TMPDIR \$SPECDIR \$SRPMDIR \$RPMDIR \$SRPMDIR \$SOURCEDIR \$BUILDDIR
81         if [ -f \$SPECDIR/%{base_name}.spec ]; then
82                 BACKUP_SPEC=1
83                 mv -f \$SPECDIR/%{base_name}.spec \$SPECDIR/%{base_name}.spec.prev
84         fi
85         if echo "\$3" | grep '\.src\.rpm$' >/dev/null; then
86                 ( cd \$SRPMDIR
87                 if echo "\$3" | grep '://' >/dev/null; then
88                         wget --passive-ftp -t0 "\$3"
89                 else
90                         cp -f "\$3" .
91                 fi
92                 rpm2cpio \`basename "\$3"\` | ( cd \$TMPDIR; cpio -i %{base_name}.spec ) )
93                 if ! cp -i \$TMPDIR/%{base_name}.spec \$SPECDIR/%{base_name}.spec; then
94                         exit 1
95                 fi
96         else
97                 if ! cp -i "\$3" \$SPECDIR; then
98                         exit 1
99                 fi
100         fi
101         ( cd \$SPECDIR
102         %{_bindir}/builder -nc -ncs --with license_agreement --opts --target=%{_target_cpu} %{base_name}.spec
103         if [ "\$?" -ne 0 ]; then
104                 exit 2
105         fi
106         RPMNAME=%{base_name}-%{version}-%{release}wla.noarch.rpm
107         rpm -U \$RPMDIR/\$RPMNAME || \
108                 echo -e Install manually the file:\\\n   \$RPMDIR/\$RPMNAME )
109         if [ "\$BACKUP_SPEC" -eq 1 ]; then
110                 mv -f \$SPECDIR/%{base_name}.spec.prev \$SPECDIR/%{base_name}.spec
111         fi
112 else
113         cat %{_datadir}/%{base_name}/Microsot-EULA.txt
114         echo "
115 License issues made us not to include inherent files into this package
116 by default (it probably requires Windows license). If you want to
117 create full working package please build it with the following command:
118
119 \$0 --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
120 "
121 fi
122 EOF
123
124 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
125
126 %else
127 install -d $RPM_BUILD_ROOT%{ttffontsdir}
128 install *.ttf $RPM_BUILD_ROOT%{ttffontsdir}
129 %endif
130
131 %clean
132 rm -rf $RPM_BUILD_ROOT
133
134 %if %{with license_agreement}
135 %post
136 fontpostinst TTF
137
138 %postun
139 fontpostinst TTF
140
141 %else
142 %pre
143 echo "
144 License issues made us not to include inherent files into this package
145 by default (it probably requires Windows license). If you want to
146 create full working package please build it with the following command:
147
148 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
149 "
150 %endif
151
152 %files
153 %defattr(644,root,root,755)
154 %if %{with license_agreement}
155 %{ttffontsdir}/*
156 %else
157 %attr(755,root,root) %{_bindir}/%{base_name}.install
158 %{_datadir}/%{base_name}
159 %endif
This page took 0.056956 seconds and 4 git commands to generate.