]> git.pld-linux.org Git - packages/fonts-TTF-microsoft.git/blob - fonts-TTF-microsoft.spec
- make spec non-interactive; release 3
[packages/fonts-TTF-microsoft.git] / fonts-TTF-microsoft.spec
1 #
2 # Conditional build:
3 # _with_license_agreement       - generates package
4 #
5 Summary:        Microsoft TTF fonts
6 Summary(pl):    Czcionki TTF firmy Microsoft
7 Name:           fonts-TTF-microsoft
8 Version:        20020525
9 Release:        3
10 License:        Microsoft EULA (for non-commercial use)
11 Group:          X11/Fonts
12 URL:            http://www.microsoft.com/truetype/fontpack/
13 Source0:        ftp://cvsup.pl.freebsd.org/pub/FreeBSD/ports/distfiles/webfonts/andale32.exe
14 Source1:        ftp://cvsup.pl.freebsd.org/pub/FreeBSD/ports/distfiles/webfonts/arial32.exe
15 Source2:        ftp://cvsup.pl.freebsd.org/pub/FreeBSD/ports/distfiles/webfonts/arialb32.exe
16 Source3:        ftp://cvsup.pl.freebsd.org/pub/FreeBSD/ports/distfiles/webfonts/comic32.exe
17 Source4:        ftp://cvsup.pl.freebsd.org/pub/FreeBSD/ports/distfiles/webfonts/courie32.exe
18 Source5:        ftp://cvsup.pl.freebsd.org/pub/FreeBSD/ports/distfiles/webfonts/georgi32.exe
19 Source6:        ftp://cvsup.pl.freebsd.org/pub/FreeBSD/ports/distfiles/webfonts/impact32.exe
20 Source7:        ftp://cvsup.pl.freebsd.org/pub/FreeBSD/ports/distfiles/webfonts/times32.exe
21 Source8:        ftp://cvsup.pl.freebsd.org/pub/FreeBSD/ports/distfiles/webfonts/trebuc32.exe
22 Source9:        ftp://cvsup.pl.freebsd.org/pub/FreeBSD/ports/distfiles/webfonts/verdan32.exe
23 Source10:       ftp://cvsup.pl.freebsd.org/pub/FreeBSD/ports/distfiles/webfonts/webdin32.exe
24 %if %{!?_with_license_agreement:1}%{?_with_license_agreement:0}
25 NoSource:       0
26 NoSource:       1
27 NoSource:       2
28 NoSource:       3
29 NoSource:       4
30 NoSource:       5
31 NoSource:       6
32 NoSource:       7
33 NoSource:       8
34 NoSource:       9
35 NoSource:       10
36 %endif
37 BuildRequires:  cabextract
38 BuildRequires:  ttmkfdir
39 BuildRequires:  util-linux
40 BuildRequires:  textutils
41 Requires(post,postun):fileutils
42 Requires(post,postun):sed
43 Buildarch:      noarch
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %define         ttffontsdir     %{_fontsdir}/TTF
47
48 %define         _prefix         /usr/X11R6
49 %define         _mandir         %{_prefix}/man
50
51 %description
52 Microsoft free TTF fonts collection
53 %description -l pl
54 Kolekcja darmowych czcionek TTF firmy Microsoft
55
56 %prep
57 %setup -q -c -T
58 /usr/bin/cabextract %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} \
59 %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} %{SOURCE9} \
60 %{SOURCE10}
61
62 %if %{!?_with_license_agreement:1}%{?_with_license_agreement:0}
63 cat Licen.TXT
64
65 cat <<EOF
66
67 Use:
68   rpm -ba --with license_agreement <specfile>
69 to rebuild the package if you accept the above license.
70
71 EOF
72 exit 1
73 %endif
74
75 %install
76 rm -rf $RPM_BUILD_ROOT
77 install -d $RPM_BUILD_ROOT%{ttffontsdir}
78 install *.ttf *.TTF $RPM_BUILD_ROOT%{ttffontsdir}
79 cd $RPM_BUILD_ROOT%{ttffontsdir}
80 /usr/bin/ttmkfdir |tail +2 >fonts.scale.%{name}
81 cd -
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %post
87 cd %{ttffontsdir}
88 umask 022
89 rm -f fonts.scale.bak
90 cat fonts.scale.* | sort -u > fonts.scale.tmp
91 cat fonts.scale.tmp | wc -l | sed -e 's/ //g' > fonts.scale
92 cat fonts.scale.tmp >> fonts.scale
93 rm -f fonts.scale.tmp fonts.dir
94 ln -sf fonts.scale fonts.dir
95 if [ -x /usr/X11R6/bin/xftcache ]; then
96         /usr/X11R6/bin/xftcache .
97 fi
98
99 %postun
100 cd %{ttffontsdir}
101 umask 022
102 rm -f fonts.scale.bak
103 cat fonts.scale.* 2>/dev/null | sort -u > fonts.scale.tmp
104 cat fonts.scale.tmp | wc -l | sed -e 's/ //g' > fonts.scale
105 cat fonts.scale.tmp >> fonts.scale
106 rm -f fonts.scale.tmp fonts.dir
107 ln -sf fonts.scale fonts.dir
108 if [ -x /usr/X11R6/bin/xftcache ]; then
109         /usr/X11R6/bin/xftcache .
110 fi
111
112 %files
113 %defattr(644,root,root,755)
114 %doc Licen.TXT
115 %{ttffontsdir}/*
This page took 0.079334 seconds and 3 git commands to generate.