-
Notifications
You must be signed in to change notification settings - Fork 1
/
jmk-x11-fonts.spec
142 lines (123 loc) · 3.58 KB
/
jmk-x11-fonts.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# User-Defined Macros:
# %define <name> <expansion>
%define Name jmk-x11-fonts
%define Version 3.0
%define Release 1
%define FoundryDir jmk
%define Prefix /usr
Summary: Character-cell fonts for X11
Name: %{Name}
Version: %{Version}
Release: %{Release}
#Serial:
Packager: Jim Knoble <[email protected]>
Copyright: GPL
Group: X11/Fonts
URL: http://www.pobox.com/~jmknoble
Source0: http://www.pobox.com/~jmknoble/fonts/%{Name}-%{Version}.tar.gz
#Patch0:
Prefix: %{Prefix}
BuildRoot: /tmp/%{Name}-%{Version}-%{Release}-root
#Provides:
#Requires:
#Obsoletes:
%description
These are character-cell fonts for use with the X Window System,
created by Jim Knoble. The current list of fonts included in this
package are:
Neep (formerly known as NouveauGothic)
A pleasantly legible variation on the standard fixed fonts that
accompany most distributions of the X Window System. Comes in both
normal and bold weights in small, medium, large, extra-large, and
huge sizes, as well as an extra-small size that only comes in
normal weight. Comes in the following encodings:
ISO-8859-1 (Latin1, Western European + Icelandic)
ISO-8859-2 (Latin2, Eastern European)
ISO-8859-9 (Latin5, Western European + Turkish)
ISO-8859-15 (Latin9, Western European + Euro Symbol)
Modd
A fixed-width font with sleek, contemporary styling. Normal and
bold weights in a 10-point (6x11) and a 12-point (6x13) size.
ISO-8859-1 encoding only.
These fonts were created using the xmbdfed BDF font editor
<ftp://crl.nmsu.edu/CLR/multiling/General/>.
For more information about fonts and the X Window System, see the X(1)
man page.
%prep
%setup
#%patch0 -b .orig
#function Replace() {
# local fil="$1"
# local sep="$2"
# local old="$3"
# local new="$4"
# local suf="$5"
# [ -z "${suf}" ] && suf='~'
# mv -f ${fil} ${fil}${suf}
# cat ${fil}${suf} | sed -e "s${sep}${old}${sep}${new}${sep}g" >$fil
#}
%build
make -C neep
xmkmf
make
%install
function CheckBuildRoot() {
# do a few sanity checks on the BuildRoot
# to make sure we don't damage a system
case "${RPM_BUILD_ROOT}" in
''|' '|/|/bin|/boot|/dev|/etc|/home|/lib|/mnt|/root|/sbin|/tmp|/usr|/var)
echo "Yikes! Don't use '${RPM_BUILD_ROOT}' for a BuildRoot!"
echo "The BuildRoot gets deleted when this package is rebuilt;"
echo "something like '/tmp/build-blah' is a better choice."
return 1
;;
*) return 0
;;
esac
}
function CleanBuildRoot() {
if CheckBuildRoot; then
rm -rf "${RPM_BUILD_ROOT}"
else
exit 1
fi
}
CleanBuildRoot
for i in \
"" \
%{Prefix} \
%{Prefix}/X11R6 \
%{Prefix}/X11R6/lib \
%{Prefix}/X11R6/lib/X11 \
%{Prefix}/X11R6/lib/X11/fonts \
; do
mkdir -p "${RPM_BUILD_ROOT}${i}"
done
make DESTDIR="${RPM_BUILD_ROOT}" install
%clean
function CheckBuildRoot() {
# do a few sanity checks on the BuildRoot
# to make sure we don't damage a system
case "${RPM_BUILD_ROOT}" in
''|' '|/|/bin|/boot|/dev|/etc|/home|/lib|/mnt|/root|/sbin|/tmp|/usr|/var)
echo "Yikes! Don't use '${RPM_BUILD_ROOT}' for a BuildRoot!"
echo "The BuildRoot gets deleted when this package is rebuilt;"
echo "something like '/tmp/build-blah' is a better choice."
return 1
;;
*) return 0
;;
esac
}
function CleanBuildRoot() {
if CheckBuildRoot; then
rm -rf "${RPM_BUILD_ROOT}"
else
exit 1
fi
}
CleanBuildRoot
%files
%attr(- ,root,root) %doc ChangeLog NEWS README %{Name}-%{Version}.lsm
%attr(0755,root,root) %dir %{Prefix}/X11R6/lib/X11/fonts/%{FoundryDir}
%attr(0444,root,root) %{Prefix}/X11R6/lib/X11/fonts/%{FoundryDir}/*