1 | %define pkg_name cpdf |
---|
2 | %define pkg_version 2.2 |
---|
3 | %define patchlevel 1 |
---|
4 | %define pkg_release 1%{?_dist_release} |
---|
5 | |
---|
6 | Summary: Command Line Tools allow you to manipulate existing PDF files |
---|
7 | Name: %{pkg_name} |
---|
8 | Version: %{pkg_version}.p%{patchlevel} |
---|
9 | Release: %{pkg_release} |
---|
10 | |
---|
11 | License: Coherent Graphics Ltd Non-Commercial Use License Agreement |
---|
12 | Group: Applications/Publishing |
---|
13 | URL: http://community.coherentpdf.com/ |
---|
14 | |
---|
15 | Source0: cpdf-source-%{pkg_version}-patchlevel%{patchlevel}.tar.gz |
---|
16 | # Source0: camlpdf-%{version}.tar.gz |
---|
17 | |
---|
18 | BuildRequires: readline-devel |
---|
19 | BuildRequires: ocaml |
---|
20 | BuildRequires: ocaml-findlib |
---|
21 | BuildRequires: ocaml-camlpdf |
---|
22 | |
---|
23 | Vendor: Project Vine |
---|
24 | Distribution: Vine Linux |
---|
25 | |
---|
26 | |
---|
27 | %description |
---|
28 | The Coherent PDF Command Line Tools allow you to manipulate |
---|
29 | existing PDF files in a variety of ways. |
---|
30 | For example: |
---|
31 | - Merge PDF files together, or split them apart Encrypt and decrypt |
---|
32 | - Scale, crop and rotate pages |
---|
33 | - Read and set document info and metadata |
---|
34 | - Copy, add or remove bookmarks |
---|
35 | - Stamp logos, text, dates, page numbers |
---|
36 | - Add or remove attachments |
---|
37 | - Losslessly compress PDF files |
---|
38 | |
---|
39 | [caution] |
---|
40 | Now we're releasing them for free, under a special not-for-commercial-use |
---|
41 | license If you like the tools and want to use them commercially, |
---|
42 | or need support, licenses are available from Coherent Graphics Ltd. |
---|
43 | #' |
---|
44 | |
---|
45 | %description -l ja |
---|
46 | Coherent PDF は PDF ファイルを操作するためのコマンドラインツールです。 |
---|
47 | |
---|
48 | [注意1] |
---|
49 | このアプリケーションは「非商用に限り」フリーで使用できます。 |
---|
50 | 詳しくは LICENCE を参照して下さい。 |
---|
51 | |
---|
52 | %package libs |
---|
53 | Summary: OCaml library for Coherent PDF |
---|
54 | Group: Development/Languages |
---|
55 | Requires: ocaml |
---|
56 | Requires: ocaml-findlib |
---|
57 | Requires: ocaml-camlpdf |
---|
58 | |
---|
59 | %description libs |
---|
60 | %{summary} |
---|
61 | |
---|
62 | |
---|
63 | %prep |
---|
64 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
65 | %setup -q -n %{name}-source-%{pkg_version}-patchlevel%{patchlevel} |
---|
66 | |
---|
67 | %build |
---|
68 | LDFLAGS="-ltinfo" %{__make} |
---|
69 | |
---|
70 | %install |
---|
71 | # for binary |
---|
72 | %{__mkdir_p} ${RPM_BUILD_ROOT}%{_bindir} |
---|
73 | %{__mkdir_p} ${RPM_BUILD_ROOT}%{_mandir}/man1 |
---|
74 | %{__cp} cpdf ${RPM_BUILD_ROOT}%{_bindir} |
---|
75 | %{__cp} cpdf.1 ${RPM_BUILD_ROOT}%{_mandir}/man1 |
---|
76 | |
---|
77 | # for libs |
---|
78 | INSTALLDIR=${RPM_BUILD_ROOT}%{_libdir}/ocaml |
---|
79 | %{__mkdir_p} ${INSTALLDIR} |
---|
80 | %{__make} install \ |
---|
81 | OCAMLFIND_INSTFLAGS="-destdir ${INSTALLDIR}" |
---|
82 | |
---|
83 | %clean |
---|
84 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
85 | |
---|
86 | %post libs |
---|
87 | echo "%{_libdir}/ocaml/%{pkg_name}" >> %{_libdir}/ocaml/ld.conf |
---|
88 | |
---|
89 | %preun libs |
---|
90 | %{__perl} -pi -e "s|^%{_libdir}/ocaml/%{pkg_name}\n$||" \ |
---|
91 | %{_libdir}/ocaml/ld.conf |
---|
92 | |
---|
93 | |
---|
94 | %files |
---|
95 | %doc doc/cpdf/html |
---|
96 | %doc Changes LICENSE cpdfmanual.pdf |
---|
97 | %{_bindir}/cpdf |
---|
98 | %{_mandir}/man1/* |
---|
99 | |
---|
100 | %files libs |
---|
101 | %{_libdir}/ocaml/cpdf |
---|
102 | |
---|
103 | |
---|
104 | %changelog |
---|
105 | * Sun Apr 15 2018 Toshiaki Ara <ara_t@384.jp> 2.2-pachlevel1 |
---|
106 | - initial build for Vine Linux |
---|
107 | |
---|