]> git.pld-linux.org Git - SPECS.git/blob - qb2c.spec
SPECS updated Tue 30 Apr 15:06:09 CEST 2024
[SPECS.git] / qb2c.spec
1 # TODO
2 # - /usr/bin/bcc collides with bcc.spec
3 Summary:        Qbasic to C conversion
4 Summary(pl.UTF-8):      Konwerter z Qbasic na C
5 Name:           qb2c
6 Version:        3.41
7 Release:        4
8 License:        freely distributable
9 Group:          Development/Languages
10 Source0:        http://matrix.irb.hr/~mario/ftp/pub/qb2c/%{name}.tgz
11 # Source0-md5:  1d877ac5e1f4a406e6cbb5db8cf10640
12 BuildRequires:  XFree86-devel
13 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
14
15 %description
16 This package attempts to convert Microsoft QBASIC programs into
17 compilable C code. A 'brun' script is also provided to directly
18 execute a qbasic program.
19
20 %description -l pl.UTF-8
21 Ten pakiet próbuje dokonać konwersji programów pisanych w Microsoft
22 QBASIC w kod kompatybilny z C. Dołączony jest też skrypt brun do
23 bezpośredniego uruchamiania programów w qbasicu.
24
25 %package static
26 Summary:        Static qbX11 library
27 Summary(pl.UTF-8):      Statyczna biblioteka qbX11
28 Group:          Development/Libraries
29 Requires:       %{name} = %{version}-%{release}
30
31 %description static
32 Static qbX11 library.
33
34 %description static -l pl.UTF-8
35 Statyczna biblioteka qbX11.
36
37 %prep
38 %setup -q -c
39
40 %build
41 %{__cc} %{rpmcflags} -o bcpp bcpp.c
42 %{__cc} %{rpmcflags} -o qb2c qb2c.c -lm
43 %{__cc} %{rpmcflags} -o calib calib.c -lm
44 %{__cc} %{rpmcflags} -c -w x11int.c rotated.c gifencode.c gifdecode.c pickpalette.c
45 ar -cr libqbX11.a x11int.o rotated.o gifencode.o gifdecode.o pickpalette.o
46 rm -f *.o
47 %{__cc} %{rpmcflags} -fPIC -c -w x11int.c rotated.c gifencode.c gifdecode.c pickpalette.c
48 %{__cc} %{rpmldflags} -shared -Wl,-soname,libqbX11.so.3 -o libqbX11.so.%{version} *.o \
49         -L/usr/X11R6/%{_lib} -lX11 -lm
50
51 cat <<'EOF' > bcc
52 #!/bin/sh
53 qb2c -b -C $1 $2 $3 $4 $5 $6
54 if test $? = 0 ; then
55         gcc -o $1 $1.c -L$(pwd) -lqbX11 -L/usr/X11R6/%{_lib} -lX11 -lm
56 fi
57 EOF
58
59 cat <<'EOF' > brun
60 #!/bin/sh
61 TEMPNAM=`mktemp /tmp/qb.XXXXXX`
62 rm -f $TEMPNAM
63 qb2c -b -C $1 $2 $3 $4 $5
64 if test $? = 0 ; then
65         gcc -o $TEMPNAM $1.c -L$(pwd) -lqbX11 -L/usr/X11R6/%{_lib} -lX11 -lm
66         if test $? = 0 ; then
67                 $TEMPNAM $2 $3 $4 $5
68         fi
69 fi
70 EOF
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}}
75
76 install bcpp qb2c calib brun bcc $RPM_BUILD_ROOT%{_bindir}
77 install libqbX11.* $RPM_BUILD_ROOT%{_libdir}
78
79 %post   -p /sbin/ldconfig
80 %postun -p /sbin/ldconfig
81
82 %clean
83 rm -rf $RPM_BUILD_ROOT
84
85 %files
86 %defattr(644,root,root,755)
87 %doc ANNOUNCEMENT IAFA-PACKAGE README manual.txt
88 %attr(755,root,root) %{_bindir}/*
89 %attr(755,root,root) %{_libdir}/libqbX11.so.*.*
90
91 %files static
92 %defattr(644,root,root,755)
93 %{_libdir}/libqbX11.a
This page took 0.541518 seconds and 3 git commands to generate.