-
Notifications
You must be signed in to change notification settings - Fork 1
/
libfoundation.spec
executable file
·115 lines (99 loc) · 4.18 KB
/
libfoundation.spec
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
Summary: Implementation of the OpenStep specification.
Name: libfoundation%{libf_major_version}%{libf_minor_version}
Version: %{libf_version}
Release: %{libf_release}.%{libf_buildcount}%{dist_suffix}
Vendor: OpenGroupware.org
Packager: Frank Reppin <frank@opengroupware.org>
License: libFoundation license
URL: http://www.opengroupware.org
Group: Development/Libraries
AutoReqProv: off
Source: %{libf_source}
Prefix: %{libf_prefix}
Requires: libobjc
Conflicts: libfoundation
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%description
libFoundation is a library that provides an almost complete
implementation of the OpenStep specification plus many other extensions
that can be found in the Apple's MacOS X Foundation library.
%package devel
Summary: Development files for libFoundation.
Group: Development/Libraries
Requires: ogo-gnustep_make libfoundation%{libf_major_version}%{libf_minor_version}
AutoReqProv: off
Conflicts: libfoundation-devel
%description devel
This package contains the development files of libFoundation.
libFoundation is a library that provides an almost complete
implementation of the OpenStep specification plus many other extensions
that can be found in the Apple's MacOS X Foundation library.
%prep
rm -fr ${RPM_BUILD_ROOT}
%setup -q -n libfoundation
# ****************************** build ********************************
%build
source %{prefix}/OGo-GNUstep/Library/Makefiles/GNUstep.sh
export CFLAGS=-Wno-import
./configure
make %{libf_makeflags} all
# ****************************** install ******************************
%install
source %{prefix}/OGo-GNUstep/Library/Makefiles/GNUstep.sh
mkdir -p ${RPM_BUILD_ROOT}%{prefix}/lib
mkdir -p ${RPM_BUILD_ROOT}%{prefix}/OGo-GNUstep/Library/Makefiles/Additional
make %{libf_makeflags} INSTALL_ROOT_DIR=${RPM_BUILD_ROOT} \
GNUSTEP_INSTALLATION_DIR=${RPM_BUILD_ROOT}%{prefix} \
FHS_INSTALL_ROOT=${RPM_BUILD_ROOT}%{prefix} \
install
rm -f ${RPM_BUILD_ROOT}%{prefix}/Library/Headers/libFoundation/extensions/exceptions/FoundationException.h
rm -f ${RPM_BUILD_ROOT}%{prefix}/Library/Headers/libFoundation/extensions/exceptions/GeneralExceptions.h
rm -f ${RPM_BUILD_ROOT}%{prefix}/Library/Headers/libFoundation/extensions/exceptions/NSCoderExceptions.h
# ****************************** post *********************************
%post
if [ $1 = 1 ]; then
if [ -d %{_sysconfdir}/ld.so.conf.d ]; then
echo "%{prefix}/lib" > %{_sysconfdir}/ld.so.conf.d/libfoundation.conf
elif [ ! "`grep '%{prefix}/lib' %{_sysconfdir}/ld.so.conf`" ]; then
echo "%{prefix}/lib" >> %{_sysconfdir}/ld.so.conf
fi
/sbin/ldconfig
fi
# ****************************** postun *********************************
%postun
if [ $1 = 0 ]; then
if [ -e %{_sysconfdir}/ld.so.conf.d/libfoundation.conf ]; then
rm -f %{_sysconfdir}/ld.so.conf.d/libfoundation.conf
fi
/sbin/ldconfig
fi
# ****************************** clean ********************************
%clean
rm -fr ${RPM_BUILD_ROOT}
# ****************************** files ********************************
%files
%defattr(-,root,root,-)
%{prefix}/bin/Defaults
%{prefix}/lib/libFoundation*.so.%{libf_version}
%{prefix}/lib/libFoundation*.so.%{libf_major_version}.%{libf_minor_version}
%{prefix}/share/libFoundation/CharacterSets
%{prefix}/share/libFoundation/Defaults
%{prefix}/share/libFoundation/TimeZoneInfo
%files devel
%defattr(-,root,root,-)
%{prefix}/OGo-GNUstep/Library/Makefiles/Additional/libFoundation.make
%{prefix}/include/lfmemory.h
%{prefix}/include/real_exception_file.h
%{prefix}/include/Foundation
%{prefix}/include/extensions
%{prefix}/lib/libFoundation*.so
# ********************************* changelog *************************
%changelog
* Thu Apr 19 2007 Frank Reppin <frank@opengroupware.org>
- add missing requires (libobjc)
* Wed Mar 16 2005 Frank Reppin <frank@opengroupware.org>
- conflicts: libfoundation (the former name of the package)
* Tue Jan 18 2005 Frank Reppin <frank@opengroupware.org>
- dealt with http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1182
* Wed Sep 09 2004 Frank Reppin <frank@opengroupware.org>
- initial build