1 Summary: Synchronization for TeX
2 Summary(pl.UTF-8): Synchronizacja dla TeXa
4 %define gitref 3131eee3509298751a5991a4a748bcaa8b51f56c
8 Release: 1.%{snap}.%{rel}
10 Group: Applications/Text
11 Source0: https://github.com/jlaurens/synctex/archive/%{gitref}/%{name}-%{gitref}.tar.gz
12 # Source0-md5: 419ba7bbca0714bd16246b66f92b2153
13 URL: https://github.com/jlaurens/synctex
14 BuildRequires: libtool
15 BuildRequires: zlib-devel
16 Requires: %{name}-libs = %{version}-%{release}
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 SyncTeX is a utility which enables synchronization between your source
21 document and the PDF output.
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.
28 Summary: SyncTeX parser library
29 Summary(pl.UTF-8): Biblioteka analizatora SyncTeX
33 SyncTeX parser library.
35 %description libs -l pl.UTF-8
36 Biblioteka analizatora SyncTeX.
39 Summary: Header files for synctex library
40 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki synctex
41 Group: Development/Libraries
42 Requires: %{name}-libs = %{version}-%{release}
46 Header files for synctex library.
48 %description devel -l pl.UTF-8
49 Pliki nagłówkowe biblioteki synctex.
52 Summary: Static synctex library
53 Summary(pl.UTF-8): Statyczna biblioteka synctex
54 Group: Development/Libraries
55 Requires: %{name}-devel = %{version}-%{release}
58 Static synctex library.
60 %description static -l pl.UTF-8
61 Statyczna biblioteka synctex.
64 %setup -q -n %{name}-%{gitref}
66 cat >synctex_parser_c-auto.h <<EOF
68 #define HAVE_LOCALE_H 1
70 #define SYNCTEX_INLINE inline
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
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
82 rm -rf $RPM_BUILD_ROOT
83 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/synctex,%{_pkgconfigdir}}
85 libtool --mode=install install libsynctex.la $RPM_BUILD_ROOT%{_libdir}
86 libtool --mode=install install synctex $RPM_BUILD_ROOT%{_bindir}
88 cp -p synctex_parser.h synctex_parser_utils.h synctex_version.h $RPM_BUILD_ROOT%{_includedir}/synctex
90 cat >>$RPM_BUILD_ROOT%{_pkgconfigdir}/synctex.pc <<'EOF'
92 exec_prefix=%{_prefix}
94 includedir=%{_includedir}
97 Description: SyncTeX parser library
99 Requires.private: zlib
100 Libs: -L${libdir} -lsynctex
101 Cflags: -I${includedir}/synctex
104 # obsoleted by pkg-config
105 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libsynctex.la
108 rm -rf $RPM_BUILD_ROOT
110 %post libs -p /sbin/ldconfig
111 %postun libs -p /sbin/ldconfig
114 %defattr(644,root,root,755)
115 %doc LICENSE README.md synctex_parser_readme.md
116 %attr(755,root,root) %{_bindir}/synctex
119 %defattr(644,root,root,755)
120 %attr(755,root,root) %{_libdir}/libsynctex.so.*.*.*
121 %attr(755,root,root) %ghost %{_libdir}/libsynctex.so.1
124 %defattr(644,root,root,755)
125 %attr(755,root,root) %{_libdir}/libsynctex.so
126 %{_includedir}/synctex
127 %{_pkgconfigdir}/synctex.pc
130 %defattr(644,root,root,755)
131 %{_libdir}/libsynctex.a