1
1
2
+ # We can't use iso-codes to generate locales, as it would create a
3
+ # "circular dependency" in our toolkit
4
+ %bcond locales 0
5
+
2
6
Summary: The basic directory layout for a Linux system
3
7
Name: filesystem
4
8
Version: 3.18
@@ -7,10 +11,12 @@ License: LicenseRef-Fedora-Public-Domain
7
11
Vendor: Microsoft Corporation
8
12
Distribution: Azure Linux
9
13
URL: https://pagure.io/filesystem
14
+ %if %{with locales }
10
15
Source1: https://pagure.io/filesystem/raw/master/f/lang-exceptions
11
16
Source2: iso_639.sed
12
17
Source3: iso_3166.sed
13
18
BuildRequires: iso-codes
19
+ %endif
14
20
15
21
# We don't order the same as Fedora here, although maybe we should.
16
22
# If ordering is changed, be sure to coordinate with setup
@@ -33,8 +39,10 @@ rm -f $RPM_BUILD_DIR/filelist
33
39
%install
34
40
rm -rf %{buildroot }
35
41
mkdir %{buildroot }
42
+ %if %{with locales }
36
43
install -p -c -m755 %SOURCE2 %{buildroot }/iso_639.sed
37
44
install -p -c -m755 %SOURCE3 %{buildroot }/iso_3166.sed
45
+ %endif
38
46
39
47
cd %{buildroot }
40
48
@@ -63,6 +71,7 @@ ln -snf usr/%{_lib} usr/lib/debug/%{_lib}
63
71
ln -snf ../.dwz usr/lib/debug/usr/.dwz
64
72
ln -snf usr/sbin usr/lib/debug/sbin
65
73
74
+ %if %{with locales }
66
75
sed -n -f %{buildroot }/iso_639.sed /usr/share/xml/iso-codes/iso_639.xml \
67
76
> %{buildroot }/iso_639.tab
68
77
sed -n -f %{buildroot }/iso_3166.sed /usr/share/xml/iso-codes/iso_3166.xml \
@@ -105,6 +114,12 @@ rm -f %{buildroot}/iso_639.tab
105
114
rm -f %{buildroot }/iso_639.sed
106
115
rm -f %{buildroot }/iso_3166.tab
107
116
rm -f %{buildroot }/iso_3166.sed
117
+ %else
118
+ # We provide NO locales
119
+ touch $RPM_BUILD_DIR/filelist
120
+ # But still own /usr/share/locale
121
+ mkdir -p -m 755 %{buildroot }/usr/share/locale
122
+ %endif
108
123
109
124
cat $RPM_BUILD_DIR/filelist | grep "locale" | while read a b ; do
110
125
mkdir -p -m 755 %{buildroot }/$b/LC_MESSAGES
0 commit comments