source: trunk/third/gnome-applets/gnome-applets.spec @ 21373

Revision 21373, 4.4 KB checked in by ghudson, 19 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r21372, which included commits to RCS files with non-trunk default branches.
Line 
1%define name    gnome-applets
2%define ver     2.8.2
3%define RELEASE 1
4%define rel     %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
5
6Summary:        Small applications which embed themselves in the GNOME panel
7Name:           %name
8Version:        %ver
9Release:        %rel
10Copyright:      GPL
11Group:          User Interface/Desktops
12Source:         ftp://ftp.gnome.org/pub/GNOME/sources/unstable/%{name}/%{name}-%{ver}.tar.gz
13URL:            http://www.gnome.org/
14BuildRoot:      /var/tmp/%{name}-%{ver}-root
15Docdir:         %{_prefix}/doc
16
17Requires:       libxml
18Requires:       libgtop
19Requires:       libghttp
20Requires:       gnome-core >= 1.1.2
21Requires:       gdk-pixbuf >= 0.7.0
22
23%description
24GNOME (GNU Network Object Model Environment) is a user-friendly
25set of applications and desktop tools to be used in conjunction with a
26window manager for the X Window System.  GNOME is similar in purpose and
27scope to CDE and KDE, but GNOME is based completely on Open Source
28software.  The gnome-applets package provides Panel applets which
29enhance your GNOME experience.
30
31You should install the gnome-applets package if you would like embed small
32utilities 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
42if [ ! -f configure ]; then
43CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh $MYARCH_FLAGS --prefix=/usr --sysconfdir=/etc
44else
45CFLAGS="$RPM_OPT_FLAGS" ./configure $MYARCH_FLAGS --prefix=/usr --sysconfdir=/etc
46fi
47
48if [ "$SMP" != "" ]; then
49  (make "MAKE=make -k -j $SMP"; exit 0)
50  make
51else
52  make
53fi
54
55%install
56[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
57make install \
58        prefix=$RPM_BUILD_ROOT%{_prefix} \
59        sysconfdir=$RPM_BUILD_ROOT/etc
60# no binary stripping
61if [ -f %{name}.files ] ; then
62  rm -f %{name}.files
63fi
64##############################################################################
65##
66function 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}
76function 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
85function 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}
105function 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
123function 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
142BuildFiles
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
Note: See TracBrowser for help on using the repository browser.