]> git.pld-linux.org Git - packages/librhtv.git/blob - librhtv.spec
- --debug is debug, --with-debug is not strip
[packages/librhtv.git] / librhtv.spec
1 Summary:        Unix port of Borland TurboVision library
2 Summary(pl.UTF-8):      Uniksowa wersja biblioteki TurboVision Borlanda
3 Name:           librhtv
4 Version:        2.2.1
5 Release:        2
6 License:        Borland, some modifications are BSD-like licensed (generally free)
7 Group:          Libraries
8 Source0:        http://download.sourceforge.net/tvision/rhtvision_%{version}-1.tar.gz
9 # Source0-md5:  46b815d86bbbb2f9b112b11f63e2f5a6
10 Patch0:         %{name}-nolowlevelgarbage.patch
11 Patch1:         %{name}-fcntl.patch
12 Patch2:         %{name}-ncurses.patch
13 Patch3:         format-security.patch
14 Patch4:         infinite-loop.patch
15 URL:            http://tvision.sourceforge.net/
16 BuildRequires:  xorg-lib-libX11-devel
17 BuildRequires:  gpm-devel
18 BuildRequires:  libstdc++-devel
19 BuildRequires:  ncurses-devel
20 BuildRequires:  perl-base
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 Turbo Vision (or TV, for short) is a library that provides an
25 application framework. With TV you can write a beautiful
26 object-oriented character-mode user interface in a short time.
27
28 TV is available in C++ and Pascal and is a product of Borland
29 International. It was developed to run on MS-DOS systems, but today it
30 is available for many other platforms (ported by independent
31 programmers).
32
33 This port is based on the Borland 2.0 version with fixes.
34
35 %description -l pl.UTF-8
36 Uniksowa wersja biblioteki TurboVision 2.0 Borlanda. TurboVision jest
37 obiektową biblioteką do okienkowych interfejsów użytkownika w trybie
38 tekstowym.
39
40 %package devel
41 Summary:        %{name} header files
42 Summary(pl.UTF-8):      Pliki nagłówkowe %{name}
43 Group:          Development/Libraries
44 Requires:       %{name} = %{version}-%{release}
45
46 %description devel
47 rhtvision header files.
48
49 %description devel -l pl.UTF-8
50 Pliki nagłówkowe rhtvision.
51
52 %package static
53 Summary:        Static %{name} libraries
54 Summary(pl.UTF-8):      Biblioteki statyczne %{name}
55 Group:          Development/Libraries
56 Requires:       %{name}-devel = %{version}-%{release}
57
58 %description static
59 Static rhtvision libraries.
60
61 %description static -l pl.UTF-8
62 Biblioteki statyczne rhtvision.
63
64 %prep
65 %setup -q -n tvision
66 %patch0 -p1
67 %patch1 -p1
68 %patch2 -p1
69 %patch3 -p1
70 %patch4 -p1
71
72 %build
73 %{__perl} config.pl \
74         --prefix=%{_prefix} \
75         --cflags="%{rpmcflags} -I/usr/include/ncursesw" \
76         --cxxflags="%{rpmcflags} -fno-exceptions -I/usr/include/ncursesw" \
77         --X11lib="X11 Xmu" \
78         --with-debug \
79         %{?debug:--debug}
80
81 %{__make} \
82         RHIDE_GCC="%{__cc}" \
83         RHIDE_GXX="%{__cxx}" \
84         RHIDE_LDFLAGS="%{rpmldflags} -shared -Wl,-soname,librhtv.so.2" \
85         libdir=%{_libdir}
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
90
91 %{__make} install \
92         prefix=$RPM_BUILD_ROOT%{_prefix} \
93         libdir=$RPM_BUILD_ROOT%{_libdir}
94
95 cd $RPM_BUILD_ROOT%{_libdir}
96 ln -sf librhtv.so.%{version} librhtv.so.2
97 cd -
98
99 # let's create new rhide.env
100 cat > examples/rhide.env  <<EOF
101 RHIDE_GCC=gcc
102 RHIDE_GXX=g++
103 RHIDE_LD=gcc
104 RHIDE_AR=ar
105 RHIDE_ARFLAGS=rcs
106 RHIDE_OS_CFLAGS=%{rpmcflags} -Wall
107 RHIDE_OS_CXXFLAGS=%{rpmcflags} -Wall
108 RHIDE_STDINC=/usr/include /usr/X11R6/include /usr/include/ncurses
109 TVSRC=%{_includedir}/rhtvision
110 RHIDE_OS_LIBS=stdc++
111 TVOBJ=
112 STDCPP_LIB=-lstdc++
113 SHARED_CODE_OPTION=-fPIC
114 EOF
115
116 cd examples
117 %{__perl} patchenv.pl
118 cd ..
119
120 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
121
122 %find_lang tvision%{version}
123
124 %clean
125 rm -rf $RPM_BUILD_ROOT
126
127 %post   -p /sbin/ldconfig
128 %postun -p /sbin/ldconfig
129
130 %files -f tvision%{version}.lang
131 %defattr(644,root,root,755)
132 %doc readme.txt TODO borland.txt
133 %attr(755,root,root) %{_libdir}/librhtv.so.*.*.*
134 %attr(755,root,root) %ghost %{_libdir}/librhtv.so.2
135
136 %files devel
137 %defattr(644,root,root,755)
138 %doc doc/*.txt doc/*.html
139 %attr(755,root,root) %{_bindir}/rhtv-config
140 %attr(755,root,root) %{_libdir}/librhtv.so
141 %{_libdir}/libtvfintl.a
142 %{_includedir}/rhtvision
143 %{_examplesdir}/%{name}-%{version}
144
145 %files static
146 %defattr(644,root,root,755)
147 %{_libdir}/librhtv.a
This page took 0.157957 seconds and 3 git commands to generate.