1 | %define name gnome-applets |
---|
2 | %define ver @VERSION@ |
---|
3 | %define RELEASE 1 |
---|
4 | %define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE} |
---|
5 | |
---|
6 | Summary: Small applications which embed themselves in the GNOME panel |
---|
7 | Name: %name |
---|
8 | Version: %ver |
---|
9 | Release: %rel |
---|
10 | Copyright: GPL |
---|
11 | Group: User Interface/Desktops |
---|
12 | Source: ftp://ftp.gnome.org/pub/GNOME/sources/unstable/%{name}/%{name}-%{ver}.tar.gz |
---|
13 | URL: http://www.gnome.org/ |
---|
14 | BuildRoot: /var/tmp/%{name}-%{ver}-root |
---|
15 | Docdir: %{_prefix}/doc |
---|
16 | |
---|
17 | Requires: libxml |
---|
18 | Requires: libgtop |
---|
19 | Requires: libghttp |
---|
20 | Requires: gnome-core >= 1.1.2 |
---|
21 | Requires: gdk-pixbuf >= 0.7.0 |
---|
22 | |
---|
23 | %description |
---|
24 | GNOME (GNU Network Object Model Environment) is a user-friendly |
---|
25 | set of applications and desktop tools to be used in conjunction with a |
---|
26 | window manager for the X Window System. GNOME is similar in purpose and |
---|
27 | scope to CDE and KDE, but GNOME is based completely on Open Source |
---|
28 | software. The gnome-applets package provides Panel applets which |
---|
29 | enhance your GNOME experience. |
---|
30 | |
---|
31 | You should install the gnome-applets package if you would like embed small |
---|
32 | utilities in the GNOME panel. |
---|
33 | |
---|
34 | %prep |
---|
35 | %setup -q |
---|
36 | |
---|
37 | %build |
---|
38 | %ifarch alpha |
---|
39 | MYARCH_FLAGS="--host=alpha-redhat-linux" |
---|
40 | %endif |
---|
41 | |
---|
42 | if [ ! -f configure ]; then |
---|
43 | CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh $MYARCH_FLAGS --prefix=/usr --sysconfdir=/etc |
---|
44 | else |
---|
45 | CFLAGS="$RPM_OPT_FLAGS" ./configure $MYARCH_FLAGS --prefix=/usr --sysconfdir=/etc |
---|
46 | fi |
---|
47 | |
---|
48 | if [ "$SMP" != "" ]; then |
---|
49 | (make "MAKE=make -k -j $SMP"; exit 0) |
---|
50 | make |
---|
51 | else |
---|
52 | make |
---|
53 | fi |
---|
54 | |
---|
55 | %install |
---|
56 | [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT |
---|
57 | make install \ |
---|
58 | prefix=$RPM_BUILD_ROOT%{_prefix} \ |
---|
59 | sysconfdir=$RPM_BUILD_ROOT/etc |
---|
60 | # no binary stripping |
---|
61 | if [ -f %{name}.files ] ; then |
---|
62 | rm -f %{name}.files |
---|
63 | fi |
---|
64 | ############################################################################## |
---|
65 | ## |
---|
66 | function ProcessLang() { |
---|
67 | # rpm provides a handy scriptlet to do the locale stuff lets use that. |
---|
68 | if [ -f /usr/lib/rpm/find-lang.sh ] ; then |
---|
69 | /usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT %name |
---|
70 | sed "s:(644, root, root, 755):(444, bin, bin, 555):" %{name}.lang >tmp.lang && mv tmp.lang %{name}.lang |
---|
71 | if [ -f %{name}.files ] ; then |
---|
72 | cat %{name}.files %{name}.lang >tmp.files && mv tmp.files %{name}.files |
---|
73 | fi |
---|
74 | fi |
---|
75 | } |
---|
76 | function ProcessBin() { |
---|
77 | # Gather up all the executable files. Stripping if requested. |
---|
78 | # This will not recurse. |
---|
79 | if [ -d $RPM_BUILD_ROOT%{_prefix}/bin ] ; then |
---|
80 | echo "%defattr (0555, bin, bin)" >>%{name}.files |
---|
81 | find $RPM_BUILD_ROOT%{_prefix}/bin -type f -print | sed "s:^$RPM_BUILD_ROOT::g" >>%{name}.files |
---|
82 | fi |
---|
83 | } |
---|
84 | |
---|
85 | function ProcessLib() { |
---|
86 | # Gather up any libraries. |
---|
87 | # Usage: ProcessLib <dir> <type> <output file> |
---|
88 | # Type is either 'runtime' or 'devel' |
---|
89 | if [ -d $1 ] ; then |
---|
90 | echo "%defattr (0555, bin, bin)" >>$3 |
---|
91 | case "$2" in |
---|
92 | runtime) |
---|
93 | # Grab runtime libraries |
---|
94 | find $1 -name "*.so.*" -print | sed "s:^$RPM_BUILD_ROOT::g" >>$3 |
---|
95 | ;; |
---|
96 | devel) |
---|
97 | find $1 -name "*.so" -print | sed "s:^$RPM_BUILD_ROOT::g" >>$3 |
---|
98 | find $1 -name "*.la" -print | sed "s:^$RPM_BUILD_ROOT::g" >>$3 |
---|
99 | find $1 -name "*.a" -print | sed "s:^$RPM_BUILD_ROOT::g" >>$3 |
---|
100 | find $1 -name "*.sh" -print | sed "s:^$RPM_BUILD_ROOT::g" >>$3 |
---|
101 | ;; |
---|
102 | esac |
---|
103 | fi |
---|
104 | } |
---|
105 | function ProcessDir() { |
---|
106 | # Build a list of files in the specified dir sticking |
---|
107 | # a %defattr line as specified in front of the mess. This is intended |
---|
108 | # for normal dirs. Use ProcessLib for library dirs |
---|
109 | # for include dirs. Appending to <output file>. |
---|
110 | # This will recurse. |
---|
111 | # |
---|
112 | # Usage: ProcessDir <dir> <output file> <attr> |
---|
113 | # |
---|
114 | if [ -d $1 ] ; then |
---|
115 | if [ ! -z "$3" ] ; then |
---|
116 | echo "%defattr ($3)" >>$2 |
---|
117 | fi |
---|
118 | echo "*** Processing $1" |
---|
119 | find $1 -type f -print | sed "s:^$RPM_BUILD_ROOT::g" >>$2 |
---|
120 | fi |
---|
121 | } |
---|
122 | |
---|
123 | function BuildFiles() { |
---|
124 | ProcessBin |
---|
125 | ProcessLang |
---|
126 | for i in `find $RPM_BUILD_ROOT%{_prefix}/share -maxdepth 1 -type d -print | \ |
---|
127 | sed "s:^$RPM_BUILD_ROOT%{_prefix}/share::g"` ; do |
---|
128 | echo $i |
---|
129 | case $i in |
---|
130 | /applets|/asclock|/clockmail|/geyes|/gnome|/gweather|/odometer|/sound-monitor|/pixmaps|/tickastat|/xmodmap|/omf) |
---|
131 | |
---|
132 | ProcessDir $RPM_BUILD_ROOT%{_prefix}/share$i %{name}.files "0444, bin, bin, 0555" |
---|
133 | ;; |
---|
134 | *) |
---|
135 | ;; |
---|
136 | esac |
---|
137 | done |
---|
138 | ProcessDir $RPM_BUILD_ROOT/etc %{name}.files "0444, bin, bin, 0555" |
---|
139 | ProcessLib $RPM_BUILD_ROOT%{_prefix}/lib runtime %{name}.files |
---|
140 | } |
---|
141 | |
---|
142 | BuildFiles |
---|
143 | |
---|
144 | %clean |
---|
145 | [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT |
---|
146 | |
---|
147 | %post -p /sbin/ldconfig |
---|
148 | %postun -p /sbin/ldconfig |
---|
149 | |
---|
150 | %files -f %{name}.files |
---|
151 | %doc AUTHORS COPYING ChangeLog NEWS README |
---|