summaryrefslogtreecommitdiff
path: root/lsb-release.spec
blob: 88a99e0d2c366cb89742190e20a2b1fe4b9dba3b (plain)
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187

# Define this to link to which library version  eg. /lib64/ld-lsb-x86-64.so.3
%define lsbsover 3

%ifarch %{ix86}
%define archname ia32
%define ldso ld-linux.so.2
%define lsbldso ld-lsb.so
%endif
%ifarch ia64
%define archname ia64
%define ldso ld-linux-ia64.so.2
%define lsbldso ld-lsb-ia64.so
%endif
%ifarch ppc
%define archname ppc32
%define ldso ld.so.1
%define lsbldso ld-lsb-ppc32.so
%endif
%ifarch ppc64
%define archname ppc64
%define ldso ld64.so.1
%define lsbldso ld-lsb-ppc64.so
%endif
%ifarch s390
%define archname s390
%define ldso ld.so.1
%define lsbldso ld-lsb-s390.so
%endif
%ifarch s390x
%define archname s390x
%define ldso ld64.so.1
%define lsbldso ld-lsb-s390x.so
%endif
%ifarch %{x8664}
%define archname amd64
%define ldso ld-linux-x86-64.so.2
%define lsbldso ld-lsb-x86-64.so
%endif

%ifarch x32
%define archname x32
%define ldso ld-linux-x32.so.2
%define lsbldso ld-lsb-x32.so
%endif

%ifarch ia64 ppc64 s390x x86_64
%define qual ()(64bit)
%else
%ifarch x32
%define qual ()(x32bit)
%else
%define qual %{nil}
%endif
%endif

Summary:	LSB base libraries support for PLD Linux
Summary(pl.UTF-8):	Narzędzia LSB (Linux Standard Base)
Name:		lsb-release
Version:	4.0
Release:	2
License:	GPL v2+
Group:		Base
#Source0:	http://dl.sourceforge.net/lsb/%{name}-2.0.tar.gz
Source0:	%{name}-2.0.tar.bz2
# Source0-md5:	cf40f5c02016bc61db03591cc3ea1ca2
Patch0:		%{name}-make.patch
URL:		http://www.linuxbase.org/
BuildRequires:	help2man
BuildRequires:	rpm >= 4.4.9-56
BuildRequires:	util-linux
Requires:	coreutils
Requires:	glibc
Requires:	util-linux
ExclusiveArch:	%{ix86} ia64 %{x8664} x32 ppc ppc64 s390 s390x
# dependency for primary LSB application for v1.3
Provides:	lsb = %{version}
# dependency for primary LSB application for v2.0 and v3.0
Provides:	lsb-core-%{archname} = %{version}
Provides:	lsb-core-noarch = %{version}
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

# no payload
%define		_enable_debug_packages	0

%description
LSB version query program. This program forms part of the required
functionality of the LSB (Linux Standard Base) specification.

The program queries the installed state of the distribution to display
certain properties such as the version of the LSB against which the
distribution claims compliance as well. It can also attempt to display
the name and release of the distribution along with an identifier of
who produces the distribution.

%description -l pl.UTF-8
Program do sprawdzania wersji LSB. Stanowi część wymaganej
funkcjonalności specyfikacji LSB (Linux Standard Base).

Program sprawdza stan instalacji dystrybucji, wyświetlając określone
właściwości, takie jak wersja LSB z którą zgodna ma być dystrybucja.
Może także próbować wyświetlić nazwę i wersję dystrybucji wraz z
identyfikatorem producenta.

%package graphics
Summary:	LSB graphics libraries support for PLD Linux
Group:		Base
Requires:	%{name} = %{version}-%{release}
Provides:	lsb-graphics-%{archname} = %{version}
Provides:	lsb-graphics-noarch = %{version}

%description graphics
The Linux Standard Base (LSB) Graphics Specifications define
components that are required to be present on an LSB conforming
system.

%package printing
Summary:	LSB printing libraries support for PLD Linux
Group:		Base
Provides:	lsb-printing-%{archname} = %{version}
Provides:	lsb-printing-noarch = %{version}

%description printing
The Linux Standard Base (LSB) Printing Specifications define
components that are required to be present on an LSB conforming
system.

%prep
%setup -q -n %{name}-2.0
%patch0 -p1

%build
%{__make}

%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
	DESTDIR=$RPM_BUILD_ROOT

install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d
cat > $RPM_BUILD_ROOT%{_sysconfdir}/lsb-release << 'EOF'
LSB_VERSION=lsb-%{version}-%{archname}:lsb-%{version}-noarch
DISTRIB_ID=PLD
DISTRIB_DESCRIPTION="PLD Linux"
%if "%{pld_release}" == "ac"
DISTRIB_RELEASE=2.0
DISTRIB_CODENAME=Ac
%endif
%if "%{pld_release}" == "th"
DISTRIB_RELEASE=3.0
DISTRIB_CODENAME=Th
%endif
EOF
%if "%{pld_release}" == "ti"
exit 1
%endif
touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/core-%{version}-%{archname}
touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/core-%{version}-noarch
touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/graphics-%{version}-%{archname}
touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/graphics-%{version}-noarch
touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/printing-%{version}-%{archname}
touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/printing-%{version}-noarch

install -d $RPM_BUILD_ROOT/%{_lib}
ln -s %{ldso} $RPM_BUILD_ROOT/%{_lib}/%{lsbldso}.%{lsbsover}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%attr(755,root,root) /%{_lib}/%{lsbldso}.%{lsbsover}
%attr(755,root,root) %{_bindir}/lsb_release
%{_mandir}/man1/lsb_release.1*
%{_sysconfdir}/lsb-release
%dir %{_sysconfdir}/%{name}.d
# These files are needed because they shows which LSB we're supporting now,
# for example, if core-3.1-noarch exists, it means we are supporting LSB3.1 now
%{_sysconfdir}/%{name}.d/core*

%files graphics
%defattr(644,root,root,755)
%{_sysconfdir}/%{name}.d/graphics*

%files printing
%defattr(644,root,root,755)
%{_sysconfdir}/%{name}.d/printing*