1# -*- mode: rpm-spec -*- 2 3# By default, this spec file will generate RPMs for clisp 4# This can be changed by modifying the variables below. 5%define enable_clisp 0 6%define clisp_flags --disable-clisp-exec 7%define enable_ccl 0 8%define ccl_flags --disable-ccl 9# ccl_flags --enable-ccl-exec --with-ccl=lx86cl 10%define enable_cmucl 0 11%define cmucl_flags --disable-cmucl 12%define enable_sbcl 0 13%define sbcl_flags --disable-sbcl-exec 14%define enable_gcl 1 15%define gcl_flags --enable-gcl 16 17# Options to build language packs 18# Spanish 19%define enable_lang_es 1 20%define lang_es_flags --enable-lang-es 21# Spanish UTF-8 22%define enable_lang_es_utf 1 23%define lang_es_flags_utf --enable-lang-es-utf8 24# Portuguese 25%define enable_lang_pt 1 26%define lang_pt_flags --enable-lang-pt 27# Portuguese UTF-8 28%define enable_lang_pt_utf 1 29%define lang_pt_flags_utf --enable-lang-pt-utf8 30# Brazilian Portuguese 31%define enable_lang_pt_br 1 32%define lang_pt_br_flags --enable-lang-pt_BR 33# Brazilian Portuguese (UTF-8) 34%define enable_lang_pt_br_utf 1 35%define lang_pt_br_flags_utf --enable-lang-pt_BR-utf8 36 37# Inhibit automatic compressing of info files. Compressed info 38# files break maxima's internal help. 39%define __spec_install_post /bin/true 40 41Summary: Symbolic Computation Program 42Name: maxima 43Version: @VERSION@ 44Release: 1 45License: GPL 46Group: Sciences/Mathematics 47URL: http://maxima.sourceforge.net 48Source0: %{name}-%{version}.tar.gz 49BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot 50Requires: maxima-exec = %{version} 51Provides: maxima-doc 52 53%description 54 55Maxima is a system for the manipulation of symbolic 56and numerical expressions, including differentiation, 57integration, Taylor series, Laplace transforms, 58ordinary differential equations, systems of linear 59equations, polynomials, sets, lists, vectors, matrices 60and tensors. 61Maxima yields high precision numeric results by using 62exact fractions, arbitrary-precision integers and 63arbitrary-precision floating point numbers. 64Maxima can plot functions and data in two and three 65dimensions, and it comes with hundreds of self tests. 66Maxima is based on the original Macsyma developed 67at MIT in the 1970's. 68 69%package xmaxima 70Summary: Maxima graphics program and graphical interface to Maxima 71Group: Sciences/Mathematics 72Requires: maxima = %{version}, tk 73Provides: xmaxima 74%description xmaxima 75 76A graphical interface to the Maxima symbolic computation 77program. It also provides a graphics program 78that can be used from Maxima, and a Web browser that 79accepts a custom html tag to execute Maxima commands from 80an html page. Xmaxima is written in the Tcl/Tk language. 81 82%package emacs 83Summary: Emacs modes for maima 84Group: Sciences/Mathematics 85Requires: maxima = %{version}, emacs 86Provides: maxima-emacs 87%description emacs 88 89emaxima and imaxima, two emacs packages that allow to run 90maxima interactively from an emacs buffer. 91 92%if %{enable_clisp} 93%package exec-clisp 94Summary: Maxima compiled with clisp 95Group: Sciences/Mathematics 96Requires: maxima = %{version} 97Provides: maxima-exec 98%description exec-clisp 99Maxima compiled with clisp. 100%endif 101 102%if %{enable_ccl} 103%package exec-ccl 104Summary: Maxima compiled with Clozure CL 105Group: Sciences/Mathematics 106Requires: maxima = %{version} 107Provides: maxima-exec 108%description exec-ccl 109Maxima compiled with Clozure Common Lisp. 110%endif 111 112%if %{enable_cmucl} 113%package exec-cmucl 114Summary: Maxima compiled with CMUCL 115Group: Sciences/Mathematics 116Requires: maxima = %{version} 117Provides: maxima-exec 118%description exec-cmucl 119Maxima compiled with CMUCL. 120%endif 121 122%if %{enable_sbcl} 123%package exec-sbcl 124Summary: Maxima compiled with SBCL 125Group: Sciences/Mathematics 126Requires: maxima = %{version} 127Provides: maxima-exec 128%description exec-sbcl 129Maxima compiled with SBCL. 130%endif 131 132%if %{enable_gcl} 133%package exec-gcl 134Summary: Maxima compiled with GCL 135Group: Sciences/Mathematics 136Requires: maxima = %{version} 137Provides: maxima-exec 138%description exec-gcl 139Maxima compiled with Gnu Common Lisp. 140%endif 141 142%if %{enable_lang_es} 143%package lang-es 144Summary: Maxima Spanish language pack 145Group: Sciences/Mathematics 146Requires: maxima = %{version} 147%description lang-es 148Maxima Spanish language support. 149%endif 150 151%if %{enable_lang_es_utf} 152%package lang-es-utf8 153Summary: Maxima Spanish UTF-8 language pack 154Group: Sciences/Mathematics 155Requires: maxima = %{version} 156%description lang-es-utf8 157Maxima Spanish language support (UTF-8). 158%endif 159 160%if %{enable_lang_pt} 161%package lang-pt 162Summary: Maxima Portuguese language pack 163Group: Sciences/Mathematics 164Requires: maxima = %{version} 165%description lang-pt 166Maxima Portuguese language support. 167%endif 168 169%if %{enable_lang_pt_utf} 170%package lang-pt-utf8 171Summary: Maxima Portuguese UTF-8 language pack 172Group: Sciences/Mathematics 173Requires: maxima = %{version} 174%description lang-pt-utf8 175Maxima Portuguese language support (UTF-8). 176%endif 177 178%if %{enable_lang_pt_br} 179%package lang-pt_BR 180Summary: Maxima Brazilian Portuguese language pack 181Group: Sciences/Mathematics 182Requires: maxima = %{version} 183%description lang-pt_BR 184Maxima Brazilian Portuguese language support. 185%endif 186 187%if %{enable_lang_pt_br_utf} 188%package lang-pt_BR-utf8 189Summary: Maxima Brazilian Portuguese UTF-8 language pack 190Group: Sciences/Mathematics 191Requires: maxima = %{version} 192%description lang-pt_BR-utf8 193Maxima Brazilian Portuguese language support (UTF-8). 194%endif 195 196%prep 197%setup -q 198%configure %{?sbcl_flags:} %{?cmucl_flags:} %{?gcl_flags:} %{?clisp_flags:} %{?ccl_flags:} \ 199 %{?lang_es_flags:} %{?lang_es_flags_utf:} \ 200 %{?lang_pt_flags:} %{?lang_pt_flags_utf:} \ 201 %{?lang_pt_br_flags:} %{?lang_pt_br_flags_utf:} 202 203%build 204make 205 206%install 207rm -rf $RPM_BUILD_ROOT 208%makeinstall 209 make \ 210 prefix=%{?buildroot:%{buildroot}}%{_prefix} \ 211 exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \ 212 bindir=%{?buildroot:%{buildroot}}%{_bindir} \ 213 sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \ 214 sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \ 215 datadir=%{?buildroot:%{buildroot}}%{_datadir} \ 216 includedir=%{?buildroot:%{buildroot}}%{_includedir} \ 217 libdir=%{?buildroot:%{buildroot}}%{_libdir} \ 218 libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \ 219 localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \ 220 sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \ 221 mandir=%{?buildroot:%{buildroot}}%{_mandir} \ 222 infodir=%{?buildroot:%{buildroot}}%{_infodir} \ 223 install-info 224touch debugfiles.list 225# Deal with info/dir 226rm -f $RPM_BUILD_ROOT%{_datadir}/info/dir 227 228%post 229/sbin/install-info %{_infodir}/maxima.info %{_infodir}/dir 230 231%postun 232if [ "$1" = 0 ]; then 233 /sbin/install-info --delete %{_infodir}/maxima.info %{_infodir}/dir 234fi 235 236%post xmaxima 237/sbin/install-info %{_infodir}/xmaxima.info %{_infodir}/dir 238 239%postun xmaxima 240if [ "$1" = 0 ]; then 241 /sbin/install-info --delete %{_infodir}/xmaxima.info %{_infodir}/dir 242fi 243 244%clean 245rm -rf $RPM_BUILD_ROOT 246 247%files 248%defattr(-,root,root,-) 249%dir %{_datadir}/maxima 250%exclude %{_datadir}/maxima/*/xmaxima 251%{_datadir}/maxima/* 252%if %{enable_lang_es} 253%exclude %{_datadir}/maxima/*/doc/html/es 254%endif 255%if %{enable_lang_pt} 256%exclude %{_datadir}/maxima/*/doc/html/pt 257%endif 258%if %{enable_lang_pt_br} 259%exclude %{_datadir}/maxima/*/doc/html/pt_BR 260%endif 261%if %{enable_lang_es_utf} 262%exclude %{_datadir}/maxima/*/doc/html/es.utf8 263%endif 264%if %{enable_lang_pt_utf} 265%exclude %{_datadir}/maxima/*/doc/html/pt.utf8 266%endif 267%if %{enable_lang_pt_br_utf} 268%exclude %{_datadir}/maxima/*/doc/html/pt_BR.utf8 269%endif 270%{_datadir}/applications 271%{_datadir}/bash-completion 272%{_datadir}/pixmaps 273%{_datadir}/mime 274%{_datadir}/metainfo/ 275%dir %{_libexecdir}/maxima 276%{_libexecdir}/maxima/* 277%{_infodir}/* 278%exclude %{_infodir}/xmaxima.info* 279%if %{enable_lang_es} 280%exclude %{_infodir}/es 281%endif 282%if %{enable_lang_pt} 283%exclude %{_infodir}/pt 284%endif 285%if %{enable_lang_pt_br} 286%exclude %{_infodir}/pt_BR 287%endif 288%if %{enable_lang_es_utf} 289%exclude %{_infodir}/es.utf8 290%endif 291%if %{enable_lang_pt_utf} 292%exclude %{_infodir}/pt.utf8 293%endif 294%if %{enable_lang_pt_br_utf} 295%exclude %{_infodir}/pt_BR.utf8 296%endif 297%{_mandir}/man1/maxima.1 298%{_bindir}/maxima 299%{_bindir}/rmaxima 300%exclude %{_datadir}/mime/packages/x-mac.xml 301%doc AUTHORS COPYING INSTALL INSTALL.lisp NEWS desktopintegration/x-mac.xml 302%doc README README.lisps README.rpms README.external README.i18n 303 304%files xmaxima 305%{_bindir}/xmaxima 306%{_datadir}/maxima/*/xmaxima 307%{_infodir}/xmaxima* 308 309%files emacs 310%{_datadir}/emacs/*/* 311 312%if %{enable_clisp} 313%files exec-clisp 314%{_libdir}/maxima/*/binary-clisp 315%endif 316 317%if %{enable_ccl} 318%files exec-ccl 319%{_libdir}/maxima/*/binary-openmcl 320%endif 321 322%if %{enable_cmucl} 323%files exec-cmucl 324%{_libdir}/maxima/*/binary-cmucl 325%endif 326 327%if %{enable_sbcl} 328%files exec-sbcl 329%{_libdir}/maxima/*/binary-sbcl 330%endif 331 332%if %{enable_gcl} 333%files exec-gcl 334%{_libdir}/maxima/*/binary-gcl 335%endif 336 337%if %{enable_lang_es} 338%files lang-es 339%{_datadir}/maxima/*/doc/html/es 340%{_infodir}/es 341%endif 342 343%if %{enable_lang_es_utf} 344%files lang-es-utf8 345%{_datadir}/maxima/*/doc/html/es.utf8 346%{_infodir}/es.utf8 347%endif 348 349%if %{enable_lang_pt} 350%files lang-pt 351%{_datadir}/maxima/*/doc/html/pt 352%{_infodir}/pt 353%endif 354 355%if %{enable_lang_pt_utf} 356%files lang-pt-utf8 357%{_datadir}/maxima/*/doc/html/pt.utf8 358%{_infodir}/pt.utf8 359%endif 360 361%if %{enable_lang_pt_br} 362%files lang-pt_BR 363%{_datadir}/maxima/*/doc/html/pt_BR 364%{_infodir}/pt_BR 365%endif 366 367%if %{enable_lang_pt_br_utf} 368%files lang-pt_BR-utf8 369%{_datadir}/maxima/*/doc/html/pt_BR.utf8 370%{_infodir}/pt_BR.utf8 371%endif 372 373%doc 374 375 376%changelog 377* Sat Jan 20 2007 Vadim Zhytnikov <vvzhy@netorn.ru> 378- Brazilian Portuguese language packs. 379 380* Mon Dec 11 2006 Jaime Villate <villate@fe.up.pt> 381- Moved xmaxima files to the maxima-xmaxima package. 382- Updated description of Xmaxima. 383 384* Wed Dec 28 2005 Vadim Zhytnikov <vvzhy@netorn.ru> 385- Spanish and Portuguese language packs. 386- Package maxima subdirectories for clean uninstall. 387 388* Sat Jan 4 2003 James Amundson <amundson@fnal.gov> 389- Added doc files 390- Added explicit clisp version 391- Added conditional to postun 392- Renamed exec_* packages to exec-* 393- Use rpm macros instead of hard-coded paths 394- Thanks to Rex Dieter for helpful suggestions 395 396* Sun Sep 8 2002 James Amundson <amundson@fnal.gov> 397- Initial build. 398