Package pstoedit: Specfile

%def_without static

Name: pstoedit
Version: 4.01
Release: alt1

Summary: converts Postscript(TM) and PDF files to other vector graphic formats
Summary(ru_RU.UTF-8): преобразует файлы Postscript(TM) и PDF в другие векторные форматы
License: GPLv2+
Group: Graphics
URL: http://www.pstoedit.net/pstoedit
Packager: Ilya Mashkin <oddity@altlinux.ru>

Source0: %name-%version.tar.gz


Patch0: pstoedit-3.40-alt3.3-makefile-ldl.patch
Patch1: pstoedit-3.44-alt2-pkg-config.patch

Patch10: pstoedit-3.44-cxxflags.patch
Patch11: pstoedit-3.45-quiet.patch
Patch12: pstoedit-3.45-gcc43.patch

Patch13: pstoedit-3.45-asy.patch
Patch14: pstoedit-3.45-elif.patch

# Fix cflags of the pkg-config file
Patch15:         pstoedit-pkglibdir.patch
Patch16:         pstoedit-fix-gcc12.patch


Requires: lib%name = %version-%release


# Automatically added by buildreq on Tue May 30 2006
BuildRequires: fontconfig gcc-c++ ghostscript-classic libgd2-devel libImageMagick-devel libplotter-devel libpng-devel pkg-config

%package -n lib%name
Summary: Libraries for pstoedit
Summary(ru_RU.UTF-8): Библиотеки для pstoedit
Group: Development/C

%package -n lib%name-devel
Summary: Development tools for pstoedit
Summary(ru_RU.UTF-8): Средства разработки для pstoedit
Group: Development/C
Requires: lib%name = %version-%release
Obsoletes: pstoedit-devel
Provides: pstoedit-devel = %version

%package -n lib%name-devel-static
Summary: Static libraries for developing pstoedit addons
Summary(ru_RU.UTF-8): Статические библиотеки для разработки дополнений к pstoedit
Group: Development/C
Requires: lib%name-devel = %version-%release
Obsoletes: pstoedit-devel-static-%version
Provides: pstoedit-devel-static

%description 
pstoedit converts PostScript and PDF files to various vector graphic
formats. The resulting files can be edited or imported into various
drawing packages. Pstoedit comes with a large set of format drivers
integrated in the binary. Additional drivers can be installed as plugins
and are available via http://www.pstoedit.net/plugins/. Just copy the
plugins to the same directory where the pstoedit binary is installed.
However, unless you also get a license key for the plugins, the
additional drivers will slightly distort the resulting graphics. See the
documentation provided with the plugins for further details.


%description -l ru_RU.UTF-8
pstoedit преобразует файлы PostScript и PDF в другие векторные форматы.
Полученные файлы можно редактировать или импортировать в различные
графические программы. В pstoedit уже содержится большое количество
обработчиков форматов (format drivers). Другие обработчики можно
устанавливать как дополнения (plugins), они доступны по адресу
http://www.pstoedit.net/plugins/. Просто скопируйте обработчик в тот же
самый каталог, в который установлена сама программа pstoedit. Однако,
если вы не получите файл с ключем для дополнений, дополнительные
обработчики будут слегка искажать изображение на выходе. Для
дополнительной информации смотрите документацию, прилагающуюся к
обработчику. 

%description -n lib%name
Libraries for pstoedit

%description -l ru_RU.UTF-8 -n lib%name
Библиотеки для pstoedit

%description -n lib%name-devel
Development tools for pstoedit


%description -l ru_RU.UTF-8 -n lib%name-devel
Средства разработки для pstoedit


%description -n lib%name-devel-static
Static libraries for developing pstoedit addons


%description -l ru_RU.UTF-8 -n lib%name-devel-static
Статические библиотеки для разработки дополнений к pstoedit

%prep
%setup -q %name-%version
#patch0 -p1
#patch1 -p1
#patch10 -p1 -b .cxxflags
#patch11 -p1 -b .quiet
%patch12 -p1 -b .gcc43
#patch13 -p1 -b .asy
#patch14 -p1 -b .elif
%patch15 -p1
%patch16 -p1

%__chmod 644 doc/*
%__chmod 644 examples/*
%__chmod 644 contrib/java/java1/*
%__chmod 644 contrib/java/java2/*
%__chmod 644 othersrc/gsdllinc/*

%build
%configure
sed -ri 's/^(hardcode_libdir_flag_spec|runpath_var)=.*/\1=/' libtool
%make CXXFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS"


%install
%makeinstall pkgdatadir=$RPM_BUILD_ROOT%_datadir/pstoedit
%__install -d $RPM_BUILD_ROOT%_man1dir
%__install -m 664 doc/pstoedit.1 $RPM_BUILD_ROOT%_man1dir



# remove non-packaged files
%__rm -f %buildroot%_libdir/*.la
%__rm -f %buildroot%_libdir/pstoedit/*.la
%if_without static
%__rm -f %buildroot%_libdir/*.a
%__rm -f %buildroot%_libdir/pstoedit/*.a
%endif

%files
%_bindir/pstoedit
%_man1dir/*
%doc doc/changelog.htm doc/readme.txt doc/pstoedit.tex doc/pstoedit.pdf doc/pstoedit.htm doc/pstoedit.trans examples contrib/java

%files -n lib%name
%_libdir/*.so.*
%dir %_libdir/pstoedit
%_libdir/pstoedit/*
%dir %_datadir/pstoedit
%_datadir/pstoedit/*

%files -n lib%name-devel
%_libdir/*.so
%_includedir/*
%_datadir/aclocal/*
%_libdir/pkgconfig/*

%if_with static
%files -n lib%name-devel-static
%_libdir/*.a
%dir %_libdir/pstoedit
%_libdir/pstoedit/*.a
%endif

%changelog
* Sat Apr 06 2024 Ilya Mashkin <oddity@altlinux.ru> 4.01-alt1
- 4.01

* Wed Jul 12 2023 Ilya Mashkin <oddity@altlinux.ru> 4.00-alt1
- 4.00

* Wed Nov 24 2021 Ilya Mashkin <oddity@altlinux.ru> 3.78-alt1
- 3.78

* Sun Sep 05 2021 Ilya Mashkin <oddity@altlinux.ru> 3.77-alt1
- 3.77

* Tue Aug 31 2021 Ilya Mashkin <oddity@altlinux.ru> 3.76-alt1
- 3.76
- Update License to GPLv2+

* Tue Feb 02 2021 Ilya Mashkin <oddity@altlinux.ru> 3.75-alt1
- 3.75

* Tue May 29 2018 Anton Farygin <rider@altlinux.ru> 3.70-alt4
- Rebuilt for new ImageMagick.

* Mon Aug 21 2017 Anton Farygin <rider@altlinux.ru> 3.70-alt2
- Rebuilt for new ImageMagick.

* Fri Aug 18 2017 Anton Farygin <rider@altlinux.ru> 3.70-alt1
- new version

* Mon Jun 15 2015 Gleb F-Malinovskiy <glebfm@altlinux.org> 3.62-alt4.1
- Rebuilt for gcc5 C++11 ABI.

* Tue Feb 17 2015 Anton Farygin <rider@altlinux.ru> 3.62-alt4
- Rebuild with new libImageMagick

* Thu Oct 23 2014 Anton Farygin <rider@altlinux.ru> 3.62-alt3
- Rebuild with new libImageMagick

* Thu Sep 26 2013 Anton Farygin <rider@altlinux.ru> 3.62-alt2
- Rebuild with new libImageMagick

* Sun Jul 28 2013 Ilya Mashkin <oddity@altlinux.ru> 3.62-alt1
- 3.62

* Fri Apr 19 2013 Anton Farygin <rider@altlinux.ru> 3.61-alt2
- Rebuild with new libImageMagick

* Tue Nov 06 2012 Ilya Mashkin <oddity@altlinux.ru> 3.61-alt1
- 3.61

* Fri Jun 08 2012 Anton Farygin <rider@altlinux.ru> 3.60-alt2
- Rebuild with new libImageMagick

* Tue Feb 07 2012 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.60-alt1.1
- Removed bad RPATH

* Sun Sep 04 2011 Ilya Mashkin <oddity@altlinux.ru> 3.60-alt1
- 3.60 (Closes: #28428)

* Tue Sep 14 2010 Anton Farygin <rider@altlinux.ru> 3.50-alt1.2
- NMU: rebuild with new libImageMagick

* Fri Sep 03 2010 Anton Farygin <rider@altlinux.ru> 3.50-alt1.1
- NMU: rebuild with new libImageMagick

* Tue Aug 11 2009 Ilya Mashkin <oddity@altlinux.ru> 3.50-alt1
- 3.50

* Fri Jul 10 2009 Ilya Mashkin <oddity@altlinux.ru> 3.45-alt3
- fix build, update patches

* Sat Nov 08 2008 Ilya Mashkin <oddity@altlinux.ru> 3.45-alt2
- update patches, fix gcc4.3 build

* Wed Oct 08 2008 Ilya Mashkin <oddity@altlinux.ru> 3.45-alt1
- 3.45

* Thu Jan 11 2007 Yury A. Zotov <yz@altlinux.ru> 3.44-alt2
- bug #10622 is fixed (pkg-config --libs pstoedit now gives only -lpstoedit)

* Tue May 30 2006 Yury A. Zotov <yz@altlinux.ru> 3.44-alt1
- new version
- BuilsRequires is updated

* Sat Apr 15 2006 Yury A. Zotov <yz@altlinux.ru> 3.40-alt4
- added pstoedit-3.40-alt3.3-makefile-ldl.patch -- link 
  libpstoedit.so with libdl explicitly
- BuildRequires is updated

* Thu Sep 15 2005 Anton Farygin <rider@altlinux.ru> 3.40-alt3.2
- rebuild with libMagick.so.9

* Mon Sep 12 2005 Anton Farygin <rider@altlinux.ru> 3.40-alt3.1
- fixed rebuild

* Sat May 28 2005 Yury A. Zotov <yz@altlinux.ru> 3.40-alt3
- build with libplotter #6142, #6788

* Sat Apr 09 2005 Yury A. Zotov <yz@altlinux.ru> 3.40-alt2
- fixed bug #6461

* Thu Jan 20 2005 Stanislav Ievlev <inger@altlinux.org> 3.40-alt1
- 3.40

* Fri Sep 17 2004 ALT QA Team Robot <qa-robot@altlinux.org> 3.33-alt5.1
- Rebuilt with libtiff.so.4.

* Wed May 26 2004 Yury A. Zotov <yz@altlinux.ru> 3.33-alt5
- buildreq libtiff-devel

* Tue Dec 09 2003 Yuri N. Sedunov <aris@altlinux.ru> 3.33-alt4
- do not package .la files.
- do not build libpstoedit-devel-static subpackage by default.

* Wed Oct 08 2003 Yury A. Zotov <yz@altlinux.ru> 3.33-alt3
- BuildRequires updates for Sisyphus 20031005
- pstoedit-3.32-alt1-configure-libtool_program.patch removed
- rebuild with hasher

* Sat Jan 25 2003 Yury A. Zotov <yz@altlinux.ru> 3.33-alt2
- libpstoedit-devel: provides/obsoletes pstoedit-devel
- libpstoedit-devel-static: provides/obsoletes pstoedit-devel-static

* Mon Jan 13 2003 Yury A. Zotov <yz@altlinux.ru> 3.33-alt1
- new version
- package split: pstoedit, libpstoedit, libpstoedit-{devel,devel-static}

* Sat Oct 26 2002 Yury A. Zotov <yz@altlinux.ru> 3.32-alt1
- new version
- split into pstoedit, pstoedit-devel, pstoedit-devel-static

* Fri Feb 1 2002 Yury Zotov <yz@altlinux.ru> 3.31-alt1
- initial release