summaryrefslogtreecommitdiff
path: root/gnomemm.spec
blob: 07151fd8385c805884e59e2af153c2f495108ed0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
Summary:	C++ interface to GNOME libraries
Summary(pl.UTF-8):	Interfejs w C++ do bibliotek GNOME
Name:		gnomemm
Version:	1.2.2
Release:	3
License:	LGPL
Group:		X11/Libraries
Source0:	http://dl.sourceforge.net/gtkmm/%{name}-%{version}.tar.gz
# Source0-md5:	2a45f162a68cd4b42881fb72a1dc528e
Patch0:		%{name}-ac_fix.patch
Patch1:		%{name}-am_fix.patch
Patch2:		%{name}-procbar_fix.patch
URL:		http://gtkmm.sourceforge.net/
BuildRequires:	autoconf
BuildRequires:	automake
BuildRequires:	esound-devel
BuildRequires:	gnome-libs-devel
BuildRequires:	gtkmm1-devel
BuildRequires:	imlib-devel
BuildRequires:	libtool
BuildRequires:	zlib-devel
Requires:	cpp
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
Gnomemm (gnome--) is a C++ interface to GNOME libraries. If you want
to run GNOME programs written in C++ you need gnomemm.

%description -l pl.UTF-8
Gnomemm (gnome--) jest interfejsem do bibliotek GNOME dla C++. Jeśli
chcesz uruchamiać programy GNOME napisane w C++ będziesz potrzebował
tych bibliotek.

%package devel
Summary:	Header files and some examples for gnomemm (gnome--)
Summary(pl.UTF-8):	Pliki nagłówkowe i przykłady dla gnomemm (gnome--)
Group:		X11/Development/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	gnome-libs-devel
Requires:	gtk+-devel
Requires:	gtkmm1-devel

%description devel
If you are going to write GNOME programs in C++ you will need this
package. It contains all header files, libraries and some examples.

%description devel -l pl.UTF-8
Jeśli zamierzasz pisać programy GNOME w C++ będziesz potrzebował tego
pakietu. Zawiera on niezbędne nagłówki, biblioteki i trochę
przykładów.

%package static
Summary:	gnomemm static libraries
Summary(pl.UTF-8):	Biblioteki statyczne gnomemm
Group:		X11/Development/Libraries
Requires:	%{name}-devel = %{version}-%{release}

%description static
Gnomemm static libraries.

%description static -l pl.UTF-8
Biblioteki statyczne gnomemm.

%prep
%setup -q
#%patch0 -p1
#%patch1
%patch2

%build
#rm -f missing
#%{__libtoolize}
#aclocal -I %{_aclocaldir}/gnome
#%{__autoconf}
#%{__automake}
CXXFLAGS="%{rpmcflags} -fno-exceptions"
%configure2_13 \
	--enable-static=yes
%{__make}

%install
rm -rf $RPM_BUILD_ROOT

install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}

%{__make} install \
	DESTDIR=$RPM_BUILD_ROOT

cp -dpr examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}

# --- start examples ---
cat $RPM_BUILD_ROOT%{_examplesdir}/%{name}/examples.conf.in \
	| sed 's/@SHELL@/\/bin\/sh/g' \
	| sed 's/@CFLAGS@/%{rpmcflags}/g' \
	| sed 's/@CPPFLAGS@/`gnome-config --cflags gnome`/g' \
	| sed 's/@CXXFLAGS@/%{rpmcflags}/g' \
	| sed 's/@CXX@/c++/g' \
	| sed 's/@CXXLD@/c++/g' \
	| sed 's/@GTKMM_CFLAGS@/`gtkmm-config --cflags`/g' \
	| sed 's/@GTKMM_LIBS@/`gtkmm-config --libs`/g' \
	| sed 's/@GNOME_INCLUDEDIR@/`gnome-config --cflags gnome`/g' \
	| sed 's/@GNOMEUI_LIBS@ @GNOME_LIBDIR@/`gnome-config --libs gnome gnomeui`/g' \
	| sed 's/@LIBTOOL@/$(SHELL) \/usr\/bin\/libtool/g' \
	| sed 's/..\/..\/src\/gnome--\/libgnomemm.la/\/usr\/X11R6\/lib\/libgnomemm.la/g' \
	| sed 's/top_builddir = ..\/../top_builddir = ./g' \
	> $RPM_BUILD_ROOT%{_examplesdir}/%{name}/examples.conf
# --- end examples ---

%clean
rm -rf $RPM_BUILD_ROOT

%post	-p /sbin/ldconfig
%postun	-p /sbin/ldconfig

%files
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libgnomemm*.so.*.*

%files devel
%defattr(644,root,root,755)
%doc README ChangeLog AUTHORS NEWS
%attr(755,root,root) %{_libdir}/lib*.so
%{_libdir}/lib*.la
%{_libdir}/gnomemmConf.sh

%{_examplesdir}/%{name}

%{_includedir}/*.h
%{_includedir}/gnome--

%files static
%defattr(644,root,root,755)
%{_libdir}/lib*.a