]> git.pld-linux.org Git - packages/synctex.git/blob - synctex.spec
aee3b70840d36a0c6541b9d33f5b28f1f4f5adfc
[packages/synctex.git] / synctex.spec
1 Summary:        Synchronization for TeX
2 Summary(pl.UTF-8):      Synchronizacja dla TeXa
3 Name:           synctex
4 %define gitref  3131eee3509298751a5991a4a748bcaa8b51f56c
5 %define snap    20171128
6 %define rel     1
7 Version:        1.21
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
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)
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
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
38 %package devel
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}
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
69 #define SETLOCALE 1
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
88 cp -p synctex_parser.h synctex_parser_utils.h synctex_version.h $RPM_BUILD_ROOT%{_includedir}/synctex
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
110 %post   libs -p /sbin/ldconfig
111 %postun libs -p /sbin/ldconfig
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
117
118 %files libs
119 %defattr(644,root,root,755)
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
This page took 0.027768 seconds and 2 git commands to generate.