-
Notifications
You must be signed in to change notification settings - Fork 83
/
jmagick.spec
93 lines (77 loc) · 2.63 KB
/
jmagick.spec
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
# for ImageMagick versions < 6.4.5, use 'rpmbuild --with oldIM'
%define oldIM 0
%{?_without_oldIM: %global oldIM 0}
%{?_with_oldIM: %global oldIM 1}
# for Java SDKs supplied directly from Sun, use 'rpmbuild --with sunjdk'
%define sunjdk 0
%{?_without_sunjdk: %global sunjdk 0}
%{?_with_sunjdk: %global sunjdk 1}
# %define magick_home %(convert --version | sed -n -e '1s@^.*file:@@' -e 's@/doc/index.html.*$@@' -e 1p)
# %define magick_home "/usr/lib64/ImageMagick-6.8.6/"
%define magick_home %(pkg-config --cflags-only-I ImageMagick | sed 's/^-I//')
Summary: open source Java interface of ImageMagick
Name: jmagick
# check configure.in, too !
Version: %(awk -F[\.] '{print $1"."$2"."$3}' <<< `rpm -q --queryformat '%{version}\n' ImageMagick`)
Release: 6
License: GPL
Group: Application/Java
URL: www.ablesky.com
Source0: jmagick-ferbar-git-src.tar.bz2
#Patch0: magickcoregenesis-error.patch
#Patch1: jmagick-getTypeMetric-kerning-spacing.patch
#Patch2: jmagick-setStringMethod-segv.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%if %{oldIM}
BuildRequires: ImageMagick-devel
%else
BuildRequires: ImageMagick-devel >= %{version}
Requires: ImageMagick >= %{version}
%endif
#
# logic for java dependencies
Requires: jre
%if %{sunjdk}
# good for Sun RPMs
BuildRequires: jdk
%else
# good for JPackage, java-*-gcj-compat, java-*-openjdk
BuildRequires: java-sdk
%endif
%description
JMagick is an open source Java interface of ImageMagick. It is
implemented in the form of a thin Java Native Interface (JNI) layer
into the ImageMagick API.
%prep
%setup -q -n jmagick-ferbar-git
%if %{oldIM}
#%patch -p1 -b .mcgenesis
%endif
#%patch1 -p1
#%patch2 -p1
%build
autoreconf --force --install
automake --add-missing
%{configure} --with-magick-home=%{magick_home} --with-magick-version=%{version}
%{__make}
%install
make DESTDIR=%{buildroot} install
%{__ln_s} libJMagick-%{version}.so %{buildroot}%{_libdir}/libJMagick.so
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc CREDITS Changelog.txt INSTALL
%{_libdir}/*
%changelog
* Mon Dec 18 2017 Jonathan Horowitz <[email protected]>
- Switch autoconf to autoreconf and automake
* Thu Jun 4 2009 John Morris <[email protected]> - 6.4.0-3
- Try to compute magick_home macro automatically
- Remove configure --jdk-home switch to grab JAVA_HOME from environment
- add rpmbuild --with sunjdk switch to build against Sun-supplied RPMs
* Wed Jun 3 2009 John Morris <[email protected]> - 6.4.0-2
- add option '--with oldIM' and patch to build for ImageMagick pre-6.4.5 (undefined symbol: MagickCoreGenesis)
- add libJMagick.so symlink
* Mon Jun 1 2009 John Morris <[email protected]> - 6.4.0-1
- Initial build