]> git.pld-linux.org Git - packages/lsb-release.git/blob - lsb-release.spec
initial support for aarch64
[packages/lsb-release.git] / lsb-release.spec
1
2 # Define this to link to which library version  eg. /lib64/ld-lsb-x86-64.so.3
3 %define lsbsover 3
4
5 %ifarch aarch64
6 %global archname aarch64
7 %global ldso ld-linux-aarch64.so.1
8 %global lsbldso ld-lsb-aarch64.so
9 %endif
10 %ifarch %{ix86}
11 %define archname ia32
12 %define ldso ld-linux.so.2
13 %define lsbldso ld-lsb.so
14 %endif
15 %ifarch ia64
16 %define archname ia64
17 %define ldso ld-linux-ia64.so.2
18 %define lsbldso ld-lsb-ia64.so
19 %endif
20 %ifarch ppc
21 %define archname ppc32
22 %define ldso ld.so.1
23 %define lsbldso ld-lsb-ppc32.so
24 %endif
25 %ifarch ppc64
26 %define archname ppc64
27 %define ldso ld64.so.1
28 %define lsbldso ld-lsb-ppc64.so
29 %endif
30 %ifarch s390
31 %define archname s390
32 %define ldso ld.so.1
33 %define lsbldso ld-lsb-s390.so
34 %endif
35 %ifarch s390x
36 %define archname s390x
37 %define ldso ld64.so.1
38 %define lsbldso ld-lsb-s390x.so
39 %endif
40 %ifarch %{x8664}
41 %define archname amd64
42 %define ldso ld-linux-x86-64.so.2
43 %define lsbldso ld-lsb-x86-64.so
44 %endif
45
46 %ifarch x32
47 %define archname x32
48 %define ldso ld-linux-x32.so.2
49 %define lsbldso ld-lsb-x32.so
50 %endif
51
52 %ifarch ia64 ppc64 s390x x86_64 aarch64
53 %define qual ()(64bit)
54 %else
55 %ifarch x32
56 %define qual ()(x32bit)
57 %else
58 %define qual %{nil}
59 %endif
60 %endif
61
62 Summary:        LSB base libraries support for PLD Linux
63 Summary(pl.UTF-8):      Narzędzia LSB (Linux Standard Base)
64 Name:           lsb-release
65 Version:        4.0
66 Release:        2
67 License:        GPL v2+
68 Group:          Base
69 #Source0:       http://dl.sourceforge.net/lsb/%{name}-2.0.tar.gz
70 Source0:        %{name}-2.0.tar.bz2
71 # Source0-md5:  cf40f5c02016bc61db03591cc3ea1ca2
72 Patch0:         %{name}-make.patch
73 URL:            http://www.linuxbase.org/
74 BuildRequires:  help2man
75 BuildRequires:  rpm >= 4.4.9-56
76 BuildRequires:  util-linux
77 Requires:       coreutils
78 Requires:       glibc
79 Requires:       util-linux
80 ExclusiveArch:  %{ix86} ia64 %{x8664} x32 ppc ppc64 s390 s390x aarch64
81 # dependency for primary LSB application for v1.3
82 Provides:       lsb = %{version}
83 # dependency for primary LSB application for v2.0 and v3.0
84 Provides:       lsb-core-%{archname} = %{version}
85 Provides:       lsb-core-noarch = %{version}
86 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
87
88 # no payload
89 %define         _enable_debug_packages  0
90
91 %description
92 LSB version query program. This program forms part of the required
93 functionality of the LSB (Linux Standard Base) specification.
94
95 The program queries the installed state of the distribution to display
96 certain properties such as the version of the LSB against which the
97 distribution claims compliance as well. It can also attempt to display
98 the name and release of the distribution along with an identifier of
99 who produces the distribution.
100
101 %description -l pl.UTF-8
102 Program do sprawdzania wersji LSB. Stanowi część wymaganej
103 funkcjonalności specyfikacji LSB (Linux Standard Base).
104
105 Program sprawdza stan instalacji dystrybucji, wyświetlając określone
106 właściwości, takie jak wersja LSB z którą zgodna ma być dystrybucja.
107 Może także próbować wyświetlić nazwę i wersję dystrybucji wraz z
108 identyfikatorem producenta.
109
110 %package graphics
111 Summary:        LSB graphics libraries support for PLD Linux
112 Group:          Base
113 Requires:       %{name} = %{version}-%{release}
114 Provides:       lsb-graphics-%{archname} = %{version}
115 Provides:       lsb-graphics-noarch = %{version}
116
117 %description graphics
118 The Linux Standard Base (LSB) Graphics Specifications define
119 components that are required to be present on an LSB conforming
120 system.
121
122 %package printing
123 Summary:        LSB printing libraries support for PLD Linux
124 Group:          Base
125 Provides:       lsb-printing-%{archname} = %{version}
126 Provides:       lsb-printing-noarch = %{version}
127
128 %description printing
129 The Linux Standard Base (LSB) Printing Specifications define
130 components that are required to be present on an LSB conforming
131 system.
132
133 %prep
134 %setup -q -n %{name}-2.0
135 %patch0 -p1
136
137 %build
138 %{__make}
139
140 %install
141 rm -rf $RPM_BUILD_ROOT
142 %{__make} install \
143         DESTDIR=$RPM_BUILD_ROOT
144
145 install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d
146 cat > $RPM_BUILD_ROOT%{_sysconfdir}/lsb-release << 'EOF'
147 LSB_VERSION=lsb-%{version}-%{archname}:lsb-%{version}-noarch
148 DISTRIB_ID=PLD
149 DISTRIB_DESCRIPTION="PLD Linux"
150 %if "%{pld_release}" == "ac"
151 DISTRIB_RELEASE=2.0
152 DISTRIB_CODENAME=Ac
153 %endif
154 %if "%{pld_release}" == "th"
155 DISTRIB_RELEASE=3.0
156 DISTRIB_CODENAME=Th
157 %endif
158 EOF
159 %if "%{pld_release}" == "ti"
160 exit 1
161 %endif
162 touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/core-%{version}-%{archname}
163 touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/core-%{version}-noarch
164 touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/graphics-%{version}-%{archname}
165 touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/graphics-%{version}-noarch
166 touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/printing-%{version}-%{archname}
167 touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/printing-%{version}-noarch
168
169 install -d $RPM_BUILD_ROOT/%{_lib}
170 ln -s %{ldso} $RPM_BUILD_ROOT/%{_lib}/%{lsbldso}.%{lsbsover}
171
172 %clean
173 rm -rf $RPM_BUILD_ROOT
174
175 %files
176 %defattr(644,root,root,755)
177 %attr(755,root,root) /%{_lib}/%{lsbldso}.%{lsbsover}
178 %attr(755,root,root) %{_bindir}/lsb_release
179 %{_mandir}/man1/lsb_release.1*
180 %{_sysconfdir}/lsb-release
181 %dir %{_sysconfdir}/%{name}.d
182 # These files are needed because they shows which LSB we're supporting now,
183 # for example, if core-3.1-noarch exists, it means we are supporting LSB3.1 now
184 %{_sysconfdir}/%{name}.d/core*
185
186 %files graphics
187 %defattr(644,root,root,755)
188 %{_sysconfdir}/%{name}.d/graphics*
189
190 %files printing
191 %defattr(644,root,root,755)
192 %{_sysconfdir}/%{name}.d/printing*
This page took 0.087567 seconds and 3 git commands to generate.