summaryrefslogtreecommitdiff
path: root/imlib2.spec.in
blob: 6329d1649cf2377f7b785354d652e487e004af9f (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
134
135
136
137
138
139
140
141
142
143
144
# Note that this is NOT a relocatable package
%define ver      @VERSION@
%define rel      2
%define prefix   @prefix@

Summary: Powerful image loading and rendering library for X11R6
Name: imlib2
Version: %ver
Release: %rel
Copyright: LGPL
Group: X11/Libraries
Source: ftp://ftp.enlightenment.org/pub/enlightenment/libs/imlib2-%{ver}.tar.gz
BuildRoot: /var/tmp/imlib-root
Packager: Term <kempler@utdallas.edu>
URL: http://www.rasterman.com/raster/imlib.html
Requires: freetype >= 1.2
Requires: libpng 
Requires: libjpeg
Requires: zlib 

Docdir: %{prefix}/doc

%description
Imlib2 is an advanced replacement library for libraries like libXpm that
provides many more features with much greater flexability and speed than
standard libraries, including font rasterization, rotation, RGBA space
rendering and blending, dynamic binary filters, scripting, and more.

%package devel
Summary: Imlib2 headers, static libraries and documentation
Group: X11/Libraries
Requires: imlib2 = %{PACKAGE_VERSION}

%description devel
Headers, static libraries and documentation for Imlib2.

#### dont build demos 
#%package demos
#Summary: Imlib2 demo programs
#Group: X11/Libraries
#Requires: imlib2 = %{PACKAGE_VERSION}
#
#%description demos
#Demonstration viewer and other programs.

%prep
%setup
cd demo
sed <Makefile.am "s@-L/usr/X11R6/lib@-L/usr/X11R6/lib -L../src/.libs@" >Makefile.am1
mv -f Makefile.am1 Makefile.am
sed <Makefile.am "s@-lX11 -lXext -lttf -lImlib2@ -lX11 -lXext -lttf -lImlib2 -lm@" >Makefile.am1
mv -f Makefile.am1 Makefile.am

%build
##### Boring normal rpm build method
# old method of building - does not auto-detect for options in OPT_FLAGS
###########################################################################
#CFLAGS="${RPM_OPT_FLAGS}" ./configure --prefix=%prefix
#make
###########################################################################

##### High-perfromance auto-detect
# Needed for snapshot releases.
# Optimize that damned code all the way
###########################################################################
#if [ ! -z "echo -n ${RPM_OPT_FLAGS} | grep pentium" ]; then
#  if [ -z "${CC}" -a ! -z "`which egcs`" ]; then
#    CC="egcs"
#    export CC
#  else
#    if [ -z "${CC}" -a ! -z "`which pgcc`" ]; then
#      CC="pgcc"
#      export CC
#    fi
#  fi
#  CFLAGS="${RPM_OPT_FLAGS}"
#else
#  CFLAGS="${RPM_OPT_FLAGS}"
#fi
#export CFLAGS
#
if [ ! -f configure ]; then
  sed <autogen.sh 's@$USER@ANNOYING@' >autogen.sh1
  mv -f autogen.sh1 autogen.sh
  chmod 0700 autogen.sh
  ./autogen.sh --prefix=%prefix
else
  ./configure --prefix=%prefix
fi

if [ "$SMP" != "" ]; then
  (make "MAKE=make -k -j $SMP"; exit 0)
  make
else
  make
fi

## added to make the viewer
cd demo
make
#mv imlib2_view imlib2-view
###########################################################################

%install
rm -rf $RPM_BUILD_ROOT
make prefix=$RPM_BUILD_ROOT%{prefix} install
mkdir -p $RPM_BUILD_ROOT%{prefix}/bin
cd demo
cp imlib2_view $RPM_BUILD_ROOT%{prefix}/bin

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc README COPYING ChangeLog TODO
%attr(755,root,root) %{prefix}/lib/lib*.so.*
%attr(755,root,root) %{prefix}/lib/loaders
%{prefix}/bin/*

%files devel
%defattr(-,root,root)
%{prefix}/lib/libImlib2.so
%{prefix}/lib/*a
%{prefix}/include/*

#%files demos
#%defattr(-,root,root)

%changelog
* Wed Aug 30 2000 Lyle Kempler <kempler@utdallas.edu>
- Include imlib2-config

* Sat May 20 2000 Lyle Kempler <kempler@utdallas.edu>
- Fixed problems with requiring imlib2_view
- Went back to imlib2_view (not imlib2-view)

* Tue Nov 2 1999 Lyle Kempler <kempler@utdallas.edu>
- Mangled imlib 1.9.8 imlib spec file into imlib2 spec file