A cut at updating the spec file now that the pkgconfig stuff and support
[platform/upstream/gnome-common.git] / gnome-common.spec.in
1 # Note this is NOT a relocatable thing :)
2 %define name            gnome-common
3 %define ver             @VERSION@
4 %define RELEASE         0_cvs_0
5 %define rel             %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
6 %define prefix          /usr
7 %define sysconfdir      /etc
8
9 Name:           %name
10 Summary:        gnome-common contains usefull things common to building gnome packages
11 Version:        %ver
12 Distribution:   GNOME
13 Vendor:         CVS
14 Release:        %rel
15 Copyright:      GPL
16 Group:          Development/Tools
17 Source:         %{name}-%{ver}.tar.gz
18 URL:            http://gnome.org
19 BuildRoot:      /var/tmp/%{name}-%{ver}-root
20 Docdir:         %{prefix}/doc
21
22 %description
23 gnome-common is for developing various GNOME modules that have to do similar things
24
25 %changelog
26 * Mon Mar 26 2000 Robin * Slomkowski <rslomkow@rslomkow.org>
27 - created this thing, and replaced the generic specfile
28
29 %prep
30 %setup
31
32 %build
33 %ifarch alpha
34   MYARCH_FLAGS="--host=alpha-redhat-linux"
35 %endif
36
37 LC_ALL=""
38 LINGUAS=""
39 LANG=""
40 export LC_ALL LINGUAS LANG
41
42 CFLAGS="$RPM_OPT_FLAGS" ./configure $MYARCH_FLAGS \
43         --prefix=%{prefix} \
44         --enable-platform-gnome-2 \
45         --sysconfdir=%{sysconfdir}
46
47 if [ "$SMP" != "" ]; then
48   (make "MAKE=make -k -j $SMP"; exit 0)
49   make
50 else
51   make
52 fi
53
54 %install
55 [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
56
57 make prefix=$RPM_BUILD_ROOT%{prefix} sysconfdir=$RPM_BUILD_ROOT%{sysconfdir} install
58
59 for FILE in "$RPM_BUILD_ROOT/bin/*"; do
60         file "$FILE" | grep -q not\ stripped && strip $FILE
61 done
62
63 %clean
64 [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
65
66 %post
67 if ! grep %{prefix}/lib /etc/ld.so.conf > /dev/null ; then
68   echo "%{prefix}/lib" >> /etc/ld.so.conf
69 fi
70   
71 /sbin/ldconfig
72   
73 %postun -p /sbin/ldconfig
74
75 %files
76
77 %defattr(0555, bin, bin)
78 %{prefix}/bin/*
79
80 %defattr (0444, bin, bin)
81 %{prefix}/share/aclocal/gnome-macros/*
82 %{prefix}/share/aclocal/gnome2-macros/*