-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkdebase.spec.in
168 lines (138 loc) · 4.58 KB
/
kdebase.spec.in
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
# You might want to edit the following 2 lines, the rest should be ok
%define qtdir /usr/lib/qt-2.1.0
Prefix: /opt/kde2
%define pamservice kde
Name: kdebase
Icon: kde-icon.xpm
URL: http://www.kde.org
Summary: K Desktop Environment - core files
Version: @VERSION@
Release: 1
Epoch: 2
Source: ftp://ftp.kde.org/pub/kde/stable/%{version}/distributions/tar/generic/source/%{name}-%{version}.tar.bz2
Obsoletes: kdpms
Group: User Interface/Desktops
Copyright: GPL
BuildRoot: /var/tmp/%{name}-buildroot
Requires: kdesupport, kdelibs
BuildPrereq: qt-devel, kdesupport-devel
%description
Core applications for the K Desktop Environment. Included are: kdm
(replacement for xdm), kwin (window manager), konqueror (filemanager, web
browser, ftp client, ...), konsole (xterm replacement), kicker
(application starter and desktop pager), kaudio (audio server),
kdehelp (viewer for kde help files, info and man pages), kthememgr
(system for managing alternate theme packages) plus other KDE
components (kcheckpass, kikbd, kscreensaver, kcontrol, kfind,
kfontmanager, kmenuedit, kappfinder).
%package 3d-screensavers
Summary: 3D screensavers for KDE
Group: User Interface/Desktops
Requires: qt-GL
BuildPrereq: qt-GL
%description 3d-screensavers
Some 3D-screensavers for the K Desktop Environment.
%prep
rm -rf $RPM_BUILD_ROOT
%setup -q
make -f Makefile.cvs
%build
export KDEDIR=%{prefix} QTDIR=%{qtdir}
CFLAGS="$RPM_OPT_FLAGS -I/usr/X11R6/include" CXXFLAGS="$RPM_OPT_FLAGS -DNO_DEBUG -DNDEBUG -I/usr/X11R6/include" \
./configure \
--prefix=%{prefix} \
--with-pam=kde \
--without-shadow \
--disable-shadow \
--with-install-root=$RPM_BUILD_ROOT
make
%install
export PATH=$PATH:/usr/X11R6/bin
make RUN_KAPPFINDER=no DESTDIR=$RPM_BUILD_ROOT install
for i in $RPM_BUILD_ROOT%{prefix}/bin/*; do
strip $i &>/dev/null || :
done
# make kcheckpass suid root
chmod 1755 $RPM_BUILD_ROOT%{prefix}/bin/kcheckpass
# remove SUID bit from konsole_grantpty
chmod 0755 $RPM_BUILD_ROOT%{prefix}/bin/konsole_grantpty
#install pam configuration file
mkdir -p $RPM_BUILD_ROOT/etc/pam.d
install -m 0644 $RPM_BUILD_DIR/kdebase-%{version}/kde.pamd \
$RPM_BUILD_ROOT/etc/pam.d/%{pamservice}
# fix kappfinder script for relocatability
{
pushd $RPM_BUILD_ROOT%{prefix}/bin
cp kappfinder kappfinder.temp
sed -e 's.\$(prefix).\$KDEDIR.g' kappfinder.temp > kappfinder
rm -f kappfinder.temp
popd
}
# make symlink for our applnk directory and GNOME directory
{
pushd $RPM_BUILD_ROOT%{prefix}/share/applnk
mkdir -p $RPM_BUILD_ROOT/etc/X11/applnk
cat > $RPM_BUILD_ROOT/etc/X11/applnk/.directory << EOF
# KDE Config File
[KDE Desktop Entry]
Icon=/usr/share/pixmaps/redhat/shadowman-round-32.xpm
MiniIcon=/usr/share/pixmaps/redhat/shadowman-round-mini.xpm
Name=Red Hat
EOF
ln -sf ../../../etc/X11/applnk redhat
mkdir -p $RPM_BUILD_ROOT/usr/share/gnome/apps
cat > $RPM_BUILD_ROOT/usr/share/gnome/apps/.directory << EOF
# KDE Config File
[KDE Desktop Entry]
Icon=/usr/share/pixmaps/gnome-logo-icon-transparent.png
Name=GNOME
EOF
ln -sf ../gnome/apps gnome
popd
}
# fix konsole /opt/kde hardcode
{
pushd konsole/other
perl -pi -e "s|/opt/kde|%{prefix}|g" *
popd
}
{
pushd $RPM_BUILD_ROOT
find . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > \
$RPM_BUILD_DIR/file.list.%{name}
find . -type f | sed -e 's,^\.,\%attr(-\,root\,root) ,' \
-e '/\/config\//s|^|%config|' >> \
$RPM_BUILD_DIR/file.list.%{name}
find . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> \
$RPM_BUILD_DIR/file.list.%{name}
# remove the 3D screensavers - we want them separate.
# no need to require Mesa/glxMesa for kdebase.
perl -pi -e "s,^.*/kmorph3d.kss,," $RPM_BUILD_DIR/file.list.%{name}
perl -pi -e "s,^.*/kspace.kss,," $RPM_BUILD_DIR/file.list.%{name}
perl -pi -e "s,^.*/kpipes.kss,," $RPM_BUILD_DIR/file.list.%{name}
echo "%docdir /usr/doc/kde" >> \
$RPM_BUILD_DIR/file.list.%{name}
popd
}
# install the linux console fonts
install -d -m 755 $RPM_BUILD_ROOT/usr/X11R6/lib/X11/fonts/misc
install -m 644 konsole/other/*.pcf.gz \
$RPM_BUILD_ROOT/usr/X11R6/lib/X11/fonts/misc
%clean
rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/files.list.%{name}
%post
cd /usr/X11R6/lib/X11/fonts/misc && /usr/X11R6/bin/mkfontdir
%postun
if [ "$1" = "0" ]; then
cd /usr/X11R6/lib/X11/fonts/misc && /usr/X11R6/bin/mkfontdir
fi
%files -f ../file.list.%{name}
%attr(-,root,root) /etc/X11/gdm/Sessions/KDE
%attr(-,root,root) /usr/X11R6/lib/X11/fonts/misc/*
%files 3d-screensavers
%attr(-,root,root) %{prefix}/bin/kmorph3d.kss
%attr(-,root,root) %{prefix}/bin/kspace.kss
%attr(-,root,root) %{prefix}/bin/kpipes.kss
%changelog
* Thu May 11 2000 Bernhard Rosenkraenzer <bero@redhat.com>
- initial specfile