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