added gnome-common.spec.in to EXTRA_DISTS added gnome-common.spec.in
[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 %package devel
26 Summary:        Libraries and include files for developing gnome-common based tools
27 Group:          Development/Libraries
28 Requires:       %name = %{PACKAGE_VERSION}
29 Obsoletes:      %{name}-devel
30
31 %package support
32 Summary:        gnome-common support applications
33 Group:          Development/Tools
34 Requires:       %name = %{PACKAGE_VERSION}
35 Obsoletes:      %{name}-devel
36
37 %description devel
38 This package provides the necessary development libraries and include
39 files to allow you to develop components that make use of gnome-common source
40
41 %description support
42 These are supporting applications for using gnome-common
43
44 %changelog
45 * Mon Mar 26 2000 Robin * Slomkowski <rslomkow@rslomkow.org>
46 - created this thing, and replaced the generic specfile
47
48 %prep
49 %setup
50
51 %build
52 %ifarch alpha
53   MYARCH_FLAGS="--host=alpha-redhat-linux"
54 %endif
55
56 LC_ALL=""
57 LINGUAS=""
58 LANG=""
59 export LC_ALL LINGUAS LANG
60
61 CFLAGS="$RPM_OPT_FLAGS" ./configure $MYARCH_FLAGS \
62         --prefix=%{prefix} \
63         --enable-platform-gnome-2 \
64         --sysconfdir=%{sysconfdir}
65
66 if [ "$SMP" != "" ]; then
67   (make "MAKE=make -k -j $SMP"; exit 0)
68   make
69 else
70   make
71 fi
72
73 %install
74 [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
75
76 make prefix=$RPM_BUILD_ROOT%{prefix} sysconfdir=$RPM_BUILD_ROOT%{sysconfdir} install
77
78 for FILE in "$RPM_BUILD_ROOT/bin/*"; do
79         file "$FILE" | grep -q not\ stripped && strip $FILE
80 done
81
82 %clean
83 [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
84
85 %post
86 if ! grep %{prefix}/lib /etc/ld.so.conf > /dev/null ; then
87   echo "%{prefix}/lib" >> /etc/ld.so.conf
88 fi
89   
90 /sbin/ldconfig
91   
92 %postun -p /sbin/ldconfig
93
94 %files
95
96 %defattr(0555, bin, bin)
97 %{prefix}/bin/*
98
99 %defattr (0444, bin, bin)
100 %{prefix}/lib/pkgconfig/*common*.pc
101 %{prefix}/share/aclocal/gnome-macros/*.m4
102 %{prefix}/share/aclocal/gnome2-macros/*.m4
103
104 %files devel
105
106 %defattr(0555, bin, bin)
107 %{prefix}/lib/*support*a
108
109 %files support
110
111 %defattr(0444, bin, bin)
112 %{prefix}/include/gnome/*/*support*.h
113 %{prefix}/lib/pkgconfig/*support*.pc
114
115 %defattr(0555, bin, bin)
116 %{prefix}/lib/*support*.so*