File: kdelibs.spec.in

package info (click to toggle)
kdelibs 4:2.2.2-13.woody.14
  • links: PTS
  • area: main
  • in suites: woody
  • size: 36,832 kB
  • ctags: 40,077
  • sloc: cpp: 313,284; ansic: 20,558; xml: 11,448; sh: 11,318; makefile: 2,426; perl: 2,084; yacc: 1,663; java: 1,538; lex: 629; python: 300
file content (191 lines) | stat: -rw-r--r-- 6,087 bytes parent folder | download
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
188
189
190
191
# You might want to change the next 3 lines, the rest should be ok.
Prefix: /opt/kde2
%define qtversion 2.2.0
%define qtdir /usr/lib/qt-%{qtversion}

Name: kdelibs
Icon: kde-icon.xpm
Summary: K Desktop Environment - Libraries
Version: @VERSION@
Release: 1
Epoch: 2
Source: ftp://ftp.kde.org/pub/kde/stable/%{version}/distribution/tar/generic/source/%{name}-%{version}.tar.bz2
Group: System Environment/Libraries
License: LGPL
BuildRoot: /var/tmp/%{name}-buildroot
Requires: qt >= %{qtversion}, kdesupport
BuildPrereq: kdoc

%description
Libraries for the K Desktop Environment:
KDE Libraries included: kdecore (KDE core library), kdeui (user interface),
khtml (HTML widget), kfile (file access), kspell
(spelling checker), kssl (secure web browsing), kab (addressbook), kimgio (image
manipulation), arts (sound, mixing and animation), kstyles, kparts, kjs (JavaScript),
kio, kdesu and ksgmltools.

%package devel
Group: Development/Libraries
Summary: Header files and documentation for compiling KDE applications.
Requires: qt-devel >= %{qtversion}, kdelibs = %{version}

%description devel
This package includes the header files you will need to compile
applications for KDE.  Also included is the KDE API documentation in HTML
format for easy browsing.

%package sound
Group: System Environment/Libraries
Summary: K Desktop Environment - Libraries for sound support
Requires: %{name} = %{version}

%description sound
Libraries for sound support in the K Desktop Environment:
arts and libkmid.

%package sound-devel
Group: Development/Libraries
Summary: Header files and documentation for compiling KDE applications with sound
Requires: qt-devel >= %{qtversion}, %{name}-sound = %{version}, %{name} = %{version}, %{name}-devel = %{version}

%description sound-devel
This package includes the header files you will need to compile applications
using the KDE sound libraries, arts and libkmid.
Also included is the API documentation for these libraries, in HTML format for
easy browsing.

%prep
rm -rf $RPM_BUILD_ROOT

%setup -q
make -f Makefile.cvs

%build
export QTDIR=%{qtdir}
./configure --prefix=%{prefix} \
	--disable-debug --with-distribution='SPEC files from sources' \
	--includedir=%{prefix}/include/kde \
	--enable-final

if [ -x /usr/bin/getconf ] ; then
    NRPROC=$(/usr/bin/getconf _NPROCESSORS_ONLN)
    if [ $NRPROC -eq 0 ] ; then
   NRPROC=1
    fi
else
    NRPROC=1
fi

make -j $NRPROC

%install
export DESTDIR=$RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install-strip

chmod a+x $RPM_BUILD_ROOT%{prefix}/lib/*

# Generate documentation
export PATH=%{prefix}/bin:$PATH
makekdedoc=`which makekdedoc`
if [ ! -z "$makekdedoc" ]; then
  kdocdir=$RPM_BUILD_ROOT%{prefix}/doc/%{name}-devel-%{version}-%{release} #used to be %{prefix}/share/kdedoc/ - but I think this makes more sense.
  mkdir -p $kdocdir
  qt2kdoc=`which qt2kdoc`
  if [ ! -z "$qt2kdoc" ]; then
    $qt2kdoc -o $kdocdir /usr/doc/qt-devel-%{qtversion}*/html
  fi
  $makekdedoc --rule-file=kdoc.rules --outputdir=$kdocdir
fi

# Create file list for sound...
(
  cd arts; make DESTDIR=$RPM_BUILD_ROOT/sound install-strip
  cd ../libkmid; make DESTDIR=$RPM_BUILD_ROOT/sound install-strip

  cd $RPM_BUILD_ROOT/sound
  mkdir -p $RPM_BUILD_ROOT%{prefix}/doc/%{name}-sound-devel-%{version}-%{release}
  (
    cd $kdocdir
    for dir in arts libkmid; do
      if [ -d $dir ]; then
        mv $kdocdir/$dir $RPM_BUILD_ROOT%{prefix}/doc/%{name}-sound-devel-%{version}-%{release}
      fi
    done
  )
  find . -type f -name '*.h' |sed -e 's|^\.|\%attr(-,root,root) \"|' > \
	$RPM_BUILD_DIR/file.list.%{name}-sound-devel
  echo "%docdir "%{prefix}/doc/%{name}-devel-%{version}-%{release} >> \
	$RPM_BUILD_DIR/file.list.%{name}-sound-devel
  find . -name '*.so*' -o -name '*.la' |sed -e 's|^\.|\%attr(-,root,root) \"|' > \
	$RPM_BUILD_DIR/file.list.%{name}-sound
  find . -type f |grep '/bin' |sed -e 's|^\.|\%attr(-,root,root) \"|' >> \
	$RPM_BUILD_DIR/file.list.%{name}-sound
  cd $RPM_BUILD_ROOT
  rm -rf sound
) || exit 1


# build file list for the rest of kdelibs
cd $RPM_BUILD_ROOT
# Use the 2nd line for releases that don't go straight to /usr:
#find . -type d | sed '1,2d;s|^\.|\%attr(-,root,root) \%dir |' > \
#		$RPM_BUILD_DIR/master.list
find . -type d | sed '1,3d;s|^\.|\%attr(-,root,root) \%dir \"|' > \
		$RPM_BUILD_DIR/master.list

find . -type f -o -type l | sed -e 's|^\.|\%attr(-,root,root) \"|' \
		-e '/\/config\//s|^|%config|' | \
	while read file; do \
		grep -q "$file\$" $RPM_BUILD_DIR/file.list.%{name}-sound* || \
			echo $file >>$RPM_BUILD_DIR/master.list
	done

grep "/include" $RPM_BUILD_DIR/master.list > \
	$RPM_BUILD_DIR/file.list.%{name}-devel
grep "/doc/%{name}-devel" $RPM_BUILD_DIR/master.list >> \
	$RPM_BUILD_DIR/file.list.%{name}-devel
grep "/doc/%{name}-sound-devel" $RPM_BUILD_DIR/master.list >> \
	$RPM_BUILD_DIR/file.list.%{name}-sound-devel
grep mcopidl $RPM_BUILD_DIR/file.list.%{name}-sound >> \
	$RPM_BUILD_DIR/file.list.%{name}-sound-devel
grep -v mcopidl $RPM_BUILD_DIR/file.list.%{name}-sound >\
	$RPM_BUILD_DIR/file.list.%{name}-sound.new
mv -f $RPM_BUILD_DIR/file.list.%{name}-sound.new \
	$RPM_BUILD_DIR/file.list.%{name}-sound

egrep -v "/include|/doc|/man/man1" \
	$RPM_BUILD_DIR/master.list > \
	$RPM_BUILD_DIR/file.list.%{name}

echo "%docdir" %{prefix}/doc/kde >> \
	$RPM_BUILD_DIR/file.list.%{name}
echo "%docdir" %{prefix}/doc/%{name}-devel-%{version}-%{release} >> \
	$RPM_BUILD_DIR/file.list.%{name}-devel
echo "%docdir" %{prefix}/doc/%{name}-sound-devel-%{version}-%{release} >> \
	$RPM_BUILD_DIR/file.list.%{name}-sound-devel

%clean
rm -rf $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_DIR/master.list
rm -rf $RPM_BUILD_DIR/file.list.%{name}*

%post -p /sbin/ldconfig

%postun
/sbin/ldconfig

%files -f ../file.list.%{name}

%files devel -f ../file.list.%{name}-devel

%files sound -f ../file.list.%{name}-sound

%files sound-devel -f ../file.list.%{name}-sound-devel

%changelog
* Sat Sep 16 2000 Robert Williams <rwilliams@kde.org>
- Update description - libraries
- Added check for # of CPUs

* Thu Jun  1 2000 Bernhard Rosenkraenzer <bero@redhat.com>
- initial