]> git.pld-linux.org Git - packages/gnustep-base.git/blob - gnustep-base.spec
- added pass-arguments patch, release 2
[packages/gnustep-base.git] / gnustep-base.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # don't generate documentation (bootstrap build w/o gnustep-base)
4 #
5 Summary:        GNUstep Base library package
6 Summary(pl):    Podstawowa biblioteka GNUstep
7 Name:           gnustep-base
8 Version:        1.9.2
9 Release:        2
10 License:        LGPL/GPL
11 Group:          Libraries
12 Source0:        ftp://ftp.gnustep.org/pub/gnustep/core/%{name}-%{version}.tar.gz
13 # Source0-md5:  b1fe102145f32aa05ebff41ffd7b9fd0
14 Source1:        %{name}.init
15 Patch0:         %{name}-link.patch
16 Patch1:         %{name}-pass-arguments.patch
17 URL:            http://www.gnustep.org/
18 BuildRequires:  ffcall-devel
19 BuildRequires:  gcc-objc
20 BuildRequires:  gmp-devel
21 %{?with_doc:BuildRequires:      gnustep-base-devel >= 1.8.0}
22 %{?with_doc:BuildRequires:      docbook-dtd41-sgml}
23 BuildRequires:  gnustep-make-devel >= 1.8.0
24 BuildRequires:  libxml2-devel >= 2.3.0
25 BuildRequires:  openssl-devel >= 0.9.7d
26 BuildRequires:  zlib-devel
27 Requires(post,preun):   grep
28 Requires(post,preun):   /sbin/chkconfig
29 Requires(post,postun):  /sbin/ldconfig
30 Requires:       gnustep-make >= 1.8.0
31 # with gdomap in /etc/services
32 Requires:       setup >= 2.4.3
33 Conflicts:      gnustep-core
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %define         _prefix         /usr/%{_lib}/GNUstep
37
38 %define         libcombo        gnu-gnu-gnu
39 %define         gsos            linux-gnu
40 %ifarch %{ix86}
41 %define         gscpu           ix86
42 %else
43 # also s/alpha.*/alpha/, but we use only "alpha" arch for now
44 %define         gscpu           %(echo %{_target_cpu} | sed -e 's/amd64/x86_64/;s/ppc/powerpc/')
45 %endif
46
47 %description
48 The GNUstep Base Library is a library of general-purpose,
49 non-graphical Objective C objects. For example, it includes classes
50 for strings, object collections, byte streams, typed coders,
51 invocations, notifications, notification dispatchers, moments in time,
52 network ports, remote object messaging support (distributed objects),
53 event loops, and random number generators.
54
55 %description -l pl
56 Podstawowa biblioteka GNUstep jest bibliotek± innych ni¿ graficzne
57 obiektów ogólnego przeznaczenia dla Objective C. Zawiera np. klasy dla
58 stringów, kolekcji, strumieni, koderów typów, powiadamiania, portów
59 sieci, obiektów rozproszonych, pêtli zdarzeñ, generatorów liczb
60 losowych.
61
62 %package devel
63 Summary:        GNUstep Base headers
64 Summary(pl):    Pliki nag³ówkowe podstawowej biblioteki GNUstep
65 Group:          Development/Libraries
66 Requires:       %{name} = %{version}-%{release}
67 Requires:       ffcall-devel
68 Requires:       gcc-objc
69 Requires:       gmp-devel
70 Requires:       gnustep-make-devel >= 1.8.0
71 Requires:       libxml2-devel
72 Requires:       zlib-devel
73 Conflicts:      gnustep-core
74
75 %description devel
76 Header files required to build applications against the GNUstep Base
77 library.
78
79 %description devel -l pl
80 Pliki nag³ówkowe potrzebne do budowania aplikacji u¿ywaj±cych
81 podstawowej biblioteki GNUstep.
82
83 %prep
84 %setup -q
85 %patch0 -p1
86 %patch1 -p1
87
88 %build
89 . %{_prefix}/System/Library/Makefiles/GNUstep.sh
90 # gnustep can use one of 3 ways of getting argc,argv,env:
91 # - /proc (default on Linux) - gnustep programs won't run in procless system
92 # - fake-main hack (main is secretly renamed and wrapped)
93 # - pass-arguments (program must call NSProcessInfo initialize)
94 %configure \
95         --enable-pass-arguments
96
97 %{__make} \
98         messages=yes
99
100 %if %{with doc}
101 # requires already installed gnustep-base
102 %{__make} -C Documentation
103 %{__make} -C Documentation/manual
104 %endif
105
106 %install
107 rm -rf $RPM_BUILD_ROOT
108 . %{_prefix}/System/Library/Makefiles/GNUstep.sh
109 %{__make} install \
110         INSTALL_ROOT_DIR=$RPM_BUILD_ROOT \
111         GNUSTEP_INSTALLATION_DIR=$RPM_BUILD_ROOT%{_prefix}/System
112
113 %if %{with doc}
114 %{__make} -C Documentation install \
115         GNUSTEP_INSTALLATION_DIR=$RPM_BUILD_ROOT%{_prefix}/System
116 %{__make} -C Documentation/manual install \
117         GNUSTEP_INSTALLATION_DIR=$RPM_BUILD_ROOT%{_prefix}/System
118 # not (yet?) supported by rpm-compress-doc
119 find $RPM_BUILD_ROOT%{_prefix}/System/Library/Documentation \
120         -type f -a ! -name '*.html' -a ! -name '*.gz' | xargs gzip -9nf
121 %endif
122
123 install -d $RPM_BUILD_ROOT%{_initrddir}
124 sed -e "s!@TOOLSARCHDIR@!%{_prefix}/System/Tools/%{gscpu}/%{gsos}!" %{SOURCE1} \
125         > $RPM_BUILD_ROOT%{_initrddir}/gnustep
126
127 echo 'GMT' > $RPM_BUILD_ROOT%{_prefix}/System/Library/Libraries/Resources/gnustep-base/NSTimeZones/localtime
128
129 %clean
130 rm -rf $RPM_BUILD_ROOT
131
132 %post
133 umask 022
134 if ! grep -q '%{_prefix}/System/Library/Libraries/%{gscpu}/%{gsos}/%{libcombo}' \
135     /etc/ld.so.conf ; then
136         echo "%{_prefix}/System/Library/Libraries/%{gscpu}/%{gsos}/%{libcombo}" >> /etc/ld.so.conf
137 fi
138 /sbin/ldconfig
139 /sbin/chkconfig --add gnustep
140 if [ -f /var/lock/subsys/gnustep ]; then
141         /etc/rc.d/init.d/gnustep restart 1>&2
142 else
143         echo "Run \"/etc/rc.d/init.d/gnustep start\" to start gnustep services."
144 fi
145
146 %preun
147 if [ "$1" = "0" ]; then
148         if [ -f /var/lock/subsys/gnustep ]; then
149                 /etc/rc.d/init.d/gnustep stop 1>&2
150         fi
151         /sbin/chkconfig --del gnustep
152 fi
153
154 %postun
155 if [ "$1" = "0" ]; then
156         umask 022
157         grep -v "^%{_prefix}/System/Library/Libraries/%{gscpu}/%{gsos}/%{libcombo}$" /etc/ld.so.conf \
158                 > /etc/ld.so.conf.tmp
159         mv -f /etc/ld.so.conf.tmp /etc/ld.so.conf
160         /sbin/ldconfig
161 fi
162
163 %triggerpostun -- gnustep-base < 1.7.0
164 umask 022
165 grep -v "^%{_prefix}/Libraries/%{gscpu}/%{gsos}/%{libcombo}$" /etc/ld.so.conf \
166         > /etc/ld.so.conf.tmp
167 mv -f /etc/ld.so.conf.tmp /etc/ld.so.conf
168 /sbin/ldconfig
169
170 %files
171 %defattr(644,root,root,755)
172 %doc ChangeLog*
173 %attr(754,root,root) %{_initrddir}/gnustep
174
175 %dir %{_prefix}/System/Library/Bundles/SSL.bundle
176 %{_prefix}/System/Library/Bundles/SSL.bundle/Resources
177 %attr(755,root,root) %{_prefix}/System/Library/Bundles/SSL.bundle/%{gscpu}
178
179 %docdir %{_prefix}/System/Library/Documentation
180 %if %{with doc}
181 %dir %{_prefix}/System/Library/Documentation/Developer/Base
182 %{_prefix}/System/Library/Documentation/Developer/Base/ReleaseNotes
183 %endif
184 %dir %{_prefix}/System/Library/Documentation/man/man8
185 %{_prefix}/System/Library/Documentation/man/man1/*.1*
186 %{_prefix}/System/Library/Documentation/man/man8/*.8*
187
188 %dir %{_prefix}/System/Library/DTDs
189 %{_prefix}/System/Library/DTDs/*.dtd
190
191 %dir %{_prefix}/System/Library/Libraries/Resources/gnustep-base
192 %{_prefix}/System/Library/Libraries/Resources/gnustep-base/English.lproj
193 %lang(fr) %{_prefix}/System/Library/Libraries/Resources/gnustep-base/French.lproj
194 %lang(de) %{_prefix}/System/Library/Libraries/Resources/gnustep-base/German.lproj
195 %lang(it) %{_prefix}/System/Library/Libraries/Resources/gnustep-base/Italian.lproj
196 %lang(zh_TW) %{_prefix}/System/Library/Libraries/Resources/gnustep-base/TraditionalChinese.lproj
197 %dir %{_prefix}/System/Library/Libraries/Resources/gnustep-base/Languages
198 %{_prefix}/System/Library/Libraries/Resources/gnustep-base/Languages/Locale.*
199 %lang(nl) %{_prefix}/System/Library/Libraries/Resources/gnustep-base/Languages/Dutch
200 %{_prefix}/System/Library/Libraries/Resources/gnustep-base/Languages/English
201 %lang(fr) %{_prefix}/System/Library/Libraries/Resources/gnustep-base/Languages/French
202 %lang(de) %{_prefix}/System/Library/Libraries/Resources/gnustep-base/Languages/German
203 %lang(hu) %{_prefix}/System/Library/Libraries/Resources/gnustep-base/Languages/Hungarian
204 %lang(it) %{_prefix}/System/Library/Libraries/Resources/gnustep-base/Languages/Italian
205 %lang(ru) %{_prefix}/System/Library/Libraries/Resources/gnustep-base/Languages/Russian
206 %lang(sk) %{_prefix}/System/Library/Libraries/Resources/gnustep-base/Languages/Slovak
207 %lang(zh_TW) %{_prefix}/System/Library/Libraries/Resources/gnustep-base/Languages/TraditionalChinese
208 %lang(uk) %{_prefix}/System/Library/Libraries/Resources/gnustep-base/Languages/UkraineRussian
209 %{_prefix}/System/Library/Libraries/Resources/gnustep-base/NSCharacterSets
210 %dir %{_prefix}/System/Library/Libraries/Resources/gnustep-base/NSTimeZones
211 %{_prefix}/System/Library/Libraries/Resources/gnustep-base/NSTimeZones/GNUmakefile
212 %{_prefix}/System/Library/Libraries/Resources/gnustep-base/NSTimeZones/GNUstep_zones
213 %{_prefix}/System/Library/Libraries/Resources/gnustep-base/NSTimeZones/README
214 %{_prefix}/System/Library/Libraries/Resources/gnustep-base/NSTimeZones/abbreviations
215 %{_prefix}/System/Library/Libraries/Resources/gnustep-base/NSTimeZones/regions
216 %{_prefix}/System/Library/Libraries/Resources/gnustep-base/NSTimeZones/zones
217 %{_prefix}/System/Library/Libraries/Resources/gnustep-base/NSTimeZones/*.m
218 %config(noreplace) %verify(not size mtime md5) %{_prefix}/System/Library/Libraries/Resources/gnustep-base/NSTimeZones/localtime
219
220 %dir %{_prefix}/System/Library/Libraries/%{gscpu}
221 %dir %{_prefix}/System/Library/Libraries/%{gscpu}/%{gsos}
222 %dir %{_prefix}/System/Library/Libraries/%{gscpu}/%{gsos}/%{libcombo}
223 %attr(755,root,root) %{_prefix}/System/Library/Libraries/%{gscpu}/%{gsos}/%{libcombo}/lib*.so.*
224
225 %dir %{_prefix}/System/Tools/%{gscpu}
226 %dir %{_prefix}/System/Tools/%{gscpu}/%{gsos}
227 # is suid necessary here??? it runs as daemon...
228 #%attr(4755,root,root) %{_prefix}/System/Tools/%{gscpu}/%{gsos}/gdomap
229 %attr(755,root,root) %{_prefix}/System/Tools/%{gscpu}/%{gsos}/gdomap
230 %dir %{_prefix}/System/Tools/%{gscpu}/%{gsos}/%{libcombo}
231 %attr(755,root,root) %{_prefix}/System/Tools/%{gscpu}/%{gsos}/%{libcombo}/*
232
233 %files devel
234 %defattr(644,root,root,755)
235 %if %{with doc}
236 %docdir %{_prefix}/System/Library/Documentation
237 %{_prefix}/System/Library/Documentation/Developer/Base/General
238 %{_prefix}/System/Library/Documentation/Developer/Base/ProgrammingManual
239 %{_prefix}/System/Library/Documentation/Developer/Base/Reference
240 %{_prefix}/System/Library/Documentation/Developer/BaseAdditions
241 %{_prefix}/System/Library/Documentation/Developer/CodingStandards
242 %{_prefix}/System/Library/Documentation/info/*.info*
243 %endif
244
245 %{_prefix}/System/Library/Headers/%{libcombo}/Foundation
246 %{_prefix}/System/Library/Headers/%{libcombo}/GNUstepBase
247 %{_prefix}/System/Library/Headers/%{libcombo}/gnustep
248 %{_prefix}/System/Library/Headers/%{libcombo}/%{gscpu}/%{gsos}/*.h
249
250 %{_prefix}/System/Library/Libraries/%{gscpu}/%{gsos}/%{libcombo}/lib*.so
251 %dir %{_prefix}/System/Library/Makefiles/Additional
252 %{_prefix}/System/Library/Makefiles/Additional/base.make
This page took 0.047227 seconds and 3 git commands to generate.