source: trunk/third/xscreensaver/xscreensaver.spec @ 15683

Revision 15683, 4.7 KB checked in by ghudson, 24 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r15682, which included commits to RCS files with non-trunk default branches.
Line 
1%define name    xscreensaver
2%define version 3.29
3%define release 1
4%define serial  1
5%define prefix  /usr/X11R6
6
7# By default, builds the basic, non-GL package.
8# To build both the basic and GL-add-on packages:
9#   rpm --define "USE_GL yes" ...
10
11Summary:        X screen saver and locker
12Name:           %{name}
13Version:        %{version}
14Release:        %{release}
15Serial:         %{serial}
16Group:          Amusements/Graphics
17Copyright:      BSD
18URL:            http://www.jwz.org/xscreensaver
19Vendor:         Jamie Zawinski <jwz@jwz.org>
20Source:         %{name}-%{version}.tar.gz
21Buildroot:      /var/tmp/%{name}-%{version}-root
22
23%description
24A modular screen saver and locker for the X Window System.
25Highly customizable: allows the use of any program that
26can draw on the root window as a display mode.
27More than 100 display modes are included in this package.
28%{?USE_GL:See also the xscreensaver-gl package, which}
29%{?USE_GL:includes optional OpenGL display modes.}
30
31%{?USE_GL:%package gl}
32%{?USE_GL:Group:        Amusements/Graphics}
33%{?USE_GL:Requires:     xscreensaver = %{version}}
34%{?USE_GL:Summary:      A set of GL screensavers}
35%{?USE_GL:%description gl}
36%{?USE_GL:The xscreensaver-gl package contains even more screensavers for your}
37%{?USE_GL:mind-numbing, ambition-eroding, time-wasting, hypnotized viewing}
38%{?USE_GL:pleasure. These screensavers require OpenGL or Mesa support.}
39%{?USE_GL: }
40%{?USE_GL:Install the xscreensaver-gl package if you need more screensavers}
41%{?USE_GL:for use with the X Window System and you have OpenGL or Mesa}
42%{?USE_GL:installed.}
43
44%prep
45%setup -q
46
47%build
48RPMOPTS=""
49
50# Is this really needed?  If so, why?
51# %ifarch alpha
52#  RPMOPTS="$RPMOPTS --without-xshm-ext"
53# %endif
54
55# On Solaris, build without PAM and with Shadow.
56# On other systems, build with PAM and without Shadow.
57#
58%ifos solaris
59 RPMOPTS="$RPMOPTS --without-pam"
60%else
61 RPMOPTS="$RPMOPTS --with-pam --without-shadow"
62%endif
63
64%{?USE_GL:RPMOPTS="$RPMOPTS --with-gl"}
65%{!?USE_GL:RPMOPTS="$RPMOPTS --without-gl"}
66
67CFLAGS="$RPM_OPT_FLAGS" \
68 ./configure --prefix=%{prefix} \
69             --enable-subdir=../lib/xscreensaver \
70             $RPMOPTS
71
72make
73
74%install
75
76# This is a directory that "make install" won't make as needed
77# (since Linux uses /etc/pam.d/* and Solaris uses /etc/pam.conf).
78#
79mkdir -p $RPM_BUILD_ROOT/etc/pam.d
80
81# This is another (since "make install" doesn't try to install
82# the xscreensaver.kss file unless $KDEDIR is set.)
83#
84if [ -z "$KDEDIR" ]; then export KDEDIR=/usr; fi
85mkdir -p $RPM_BUILD_ROOT$KDEDIR/bin
86
87# And two more for Gnome (same reason...)
88#
89mkdir -p $RPM_BUILD_ROOT/usr/share/control-center/Desktop
90mkdir -p $RPM_BUILD_ROOT/usr/share/gnome/apps/Settings/Desktop
91
92make  install_prefix=$RPM_BUILD_ROOT \
93      AD_DIR=%{prefix}/lib/X11/app-defaults \
94      install-strip
95
96# Make a pair of lists, of the GL and non-GL executable.
97# Do this by parsing the output of a dummy run of "make install"
98# in the driver/, hacks/ and hacks/glx/ directories.
99#
100list_files() {
101  make -s install_prefix=$RPM_BUILD_ROOT INSTALL=true $1  |
102    sed -n -e 's@.* /\([^ ]*\)$@/\1@p'                    |
103    sed    -e "s@^$RPM_BUILD_ROOT@@"                      \
104           -e "s@/bin/\.\./@/@"                           |
105    sed    -e 's@\(.*/man/.*\)@\1\*@'                     |
106    sort
107}
108
109( cd hacks ; list_files install ; cd ../driver; list_files install-program ) \
110   > $RPM_BUILD_DIR/xscreensaver-%{version}/exes-non-gl
111( cd hacks/glx ; list_files install ) \
112   > $RPM_BUILD_DIR/xscreensaver-%{version}/exes-gl
113
114
115
116# This line is redundant, except that it causes the "xscreensaver"
117# executable to be installed unstripped (while all others are stripped.)
118# You should install it this way so that jwz gets useful bug reports.
119#
120install -m 4755 driver/xscreensaver $RPM_BUILD_ROOT%{prefix}/bin
121
122# Even if we weren't compiled with PAM support, make sure to include
123# the PAM module file in the RPM anyway, just in case.
124#
125( cd driver ;
126  make install_prefix=$RPM_BUILD_ROOT PAM_DIR=/etc/pam.d install-pam )
127
128# Make sure all files are readable by all, and writable only by owner.
129#
130chmod -R a+r,u+w,og-w $RPM_BUILD_ROOT
131
132%clean
133if [ -d $RPM_BUILD_ROOT    ]; then rm -r $RPM_BUILD_ROOT    ; fi
134if [ -d $RPM_BUILD_ROOT-gl ]; then rm -r $RPM_BUILD_ROOT-gl ; fi
135
136%files -f exes-non-gl
137%defattr(-,root,root)
138
139# Files for the "xscreensaver" package:
140#
141%doc                README README.debugging
142%dir                %{prefix}/lib/xscreensaver
143%config             %{prefix}/lib/X11/app-defaults/*
144                    %{prefix}/man/man1/xscreensaver*
145                    /etc/pam.d/*
146%config(missingok)  /usr/bin/*.kss
147%config(missingok)  /usr/share/control-center/Desktop/screensaver-properties.desktop
148%config(missingok)  /usr/share/gnome/apps/Settings/Desktop/screensaver-properties.desktop
149%config(missingok)  /usr/share/pixmaps/*
150
151# Files for the "xscreensaver-gl" package:
152#
153%{?USE_GL:%files -f exes-gl gl}
Note: See TracBrowser for help on using the repository browser.