]>
Commit | Line | Data |
---|---|---|
bcef7ef9 JB |
1 | Summary: Synchronization for TeX |
2 | Summary(pl.UTF-8): Synchronizacja dla TeXa | |
3 | Name: synctex | |
5d0276d1 JB |
4 | %define gitref c11fe00dbdc6423a0e54d4e531563be645f78679 |
5 | %define snap 20200723 | |
bcef7ef9 | 6 | %define rel 1 |
5d0276d1 | 7 | Version: 1.22 |
bcef7ef9 JB |
8 | Release: 1.%{snap}.%{rel} |
9 | License: MIT | |
10 | Group: Applications/Text | |
11 | Source0: https://github.com/jlaurens/synctex/archive/%{gitref}/%{name}-%{gitref}.tar.gz | |
5d0276d1 | 12 | # Source0-md5: ff0590b4f33dcffbbe1c7debed4d7a01 |
bcef7ef9 JB |
13 | URL: https://github.com/jlaurens/synctex |
14 | BuildRequires: libtool | |
15 | BuildRequires: zlib-devel | |
f6549f24 | 16 | Requires: %{name}-libs = %{version}-%{release} |
bcef7ef9 JB |
17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
18 | ||
19 | %description | |
20 | SyncTeX is a utility which enables synchronization between your source | |
21 | document and the PDF output. | |
22 | ||
23 | %description -l pl.UTF-8 | |
24 | SyncTeX to narzędzie pozwalające na synchronizację między dokumentem | |
25 | źródłowym a wyjściem PDF. | |
26 | ||
f6549f24 JB |
27 | %package libs |
28 | Summary: SyncTeX parser library | |
29 | Summary(pl.UTF-8): Biblioteka analizatora SyncTeX | |
30 | Group: Libraries | |
31 | ||
32 | %description libs | |
33 | SyncTeX parser library. | |
34 | ||
35 | %description libs -l pl.UTF-8 | |
36 | Biblioteka analizatora SyncTeX. | |
37 | ||
bcef7ef9 JB |
38 | %package devel |
39 | Summary: Header files for synctex library | |
40 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki synctex | |
41 | Group: Development/Libraries | |
f6549f24 | 42 | Requires: %{name}-libs = %{version}-%{release} |
bcef7ef9 JB |
43 | Requires: zlib-devel |
44 | ||
45 | %description devel | |
46 | Header files for synctex library. | |
47 | ||
48 | %description devel -l pl.UTF-8 | |
49 | Pliki nagłówkowe biblioteki synctex. | |
50 | ||
51 | %package static | |
52 | Summary: Static synctex library | |
53 | Summary(pl.UTF-8): Statyczna biblioteka synctex | |
54 | Group: Development/Libraries | |
55 | Requires: %{name}-devel = %{version}-%{release} | |
56 | ||
57 | %description static | |
58 | Static synctex library. | |
59 | ||
60 | %description static -l pl.UTF-8 | |
61 | Statyczna biblioteka synctex. | |
62 | ||
63 | %prep | |
64 | %setup -q -n %{name}-%{gitref} | |
65 | ||
66 | cat >synctex_parser_c-auto.h <<EOF | |
67 | #define HAVE_FMAX 1 | |
68 | #define HAVE_LOCALE_H 1 | |
5d0276d1 | 69 | #define HAVE_SETLOCALE 1 |
bcef7ef9 JB |
70 | #define SYNCTEX_INLINE inline |
71 | EOF | |
72 | ||
73 | %build | |
74 | libtool --mode=compile %{__cc} %{rpmcflags} %{rpmcppflags} -I. -c synctex_parser.c | |
75 | libtool --mode=compile %{__cc} %{rpmcflags} %{rpmcppflags} -I. -c synctex_parser_utils.c | |
76 | libtool --mode=compile %{__cc} %{rpmcflags} %{rpmcppflags} -I. -D__SYNCTEX_WORK__ -c synctex_main.c | |
77 | ||
78 | libtool --mode=link %{__cc} %{rpmldflags} %{rpmcflags} -o libsynctex.la -rpath %{_libdir} -no-undefined -version-info 22:0:21 synctex_parser.lo synctex_parser_utils.lo -lz -lm | |
79 | libtool --mode=link %{__cc} %{rpmldflags} %{rpmcflags} -o synctex synctex_main.lo libsynctex.la | |
80 | ||
81 | %install | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/synctex,%{_pkgconfigdir}} | |
84 | ||
85 | libtool --mode=install install libsynctex.la $RPM_BUILD_ROOT%{_libdir} | |
86 | libtool --mode=install install synctex $RPM_BUILD_ROOT%{_bindir} | |
87 | ||
c266e0f9 | 88 | cp -p synctex_parser.h synctex_parser_utils.h synctex_version.h $RPM_BUILD_ROOT%{_includedir}/synctex |
bcef7ef9 JB |
89 | |
90 | cat >>$RPM_BUILD_ROOT%{_pkgconfigdir}/synctex.pc <<'EOF' | |
91 | prefix=%{_prefix} | |
92 | exec_prefix=%{_prefix} | |
93 | libdir=%{_libdir} | |
94 | includedir=%{_includedir} | |
95 | ||
96 | Name: synctex | |
97 | Description: SyncTeX parser library | |
98 | Version: %{version} | |
99 | Requires.private: zlib | |
100 | Libs: -L${libdir} -lsynctex | |
101 | Cflags: -I${includedir}/synctex | |
102 | EOF | |
103 | ||
104 | # obsoleted by pkg-config | |
105 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libsynctex.la | |
106 | ||
107 | %clean | |
108 | rm -rf $RPM_BUILD_ROOT | |
109 | ||
f6549f24 JB |
110 | %post libs -p /sbin/ldconfig |
111 | %postun libs -p /sbin/ldconfig | |
bcef7ef9 JB |
112 | |
113 | %files | |
114 | %defattr(644,root,root,755) | |
115 | %doc LICENSE README.md synctex_parser_readme.md | |
116 | %attr(755,root,root) %{_bindir}/synctex | |
f6549f24 JB |
117 | |
118 | %files libs | |
119 | %defattr(644,root,root,755) | |
bcef7ef9 JB |
120 | %attr(755,root,root) %{_libdir}/libsynctex.so.*.*.* |
121 | %attr(755,root,root) %ghost %{_libdir}/libsynctex.so.1 | |
122 | ||
123 | %files devel | |
124 | %defattr(644,root,root,755) | |
125 | %attr(755,root,root) %{_libdir}/libsynctex.so | |
126 | %{_includedir}/synctex | |
127 | %{_pkgconfigdir}/synctex.pc | |
128 | ||
129 | %files static | |
130 | %defattr(644,root,root,755) | |
131 | %{_libdir}/libsynctex.a |