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