# private libraries that do not have an soname should not be in provides %global _privatelibs ^(%{_libdir}/%{name}/plugins.*/.*\\.so.*)$ %global _priv_debuginfo ^(.*lib.*[.]so-.*)$ %global __provides_exclude_from ^(%{_privatelibs}|%{_priv_debuginfo})$ %global __requires_exclude_from ^(%{_privatelibs}|%{_priv_debuginfo})$ Name: aubit4gl Version: 1.6.1 Release: 1%{?dist} Summary: IBM Informix 4GL compatible compiler # The entire source code is GPL-2.0-or-later except # tools/cgi_4gl which is MIT # lib/bin/svn2cl.xsl which is BSD-3-Clause # lib/libaubit4gl/curl.c which is BSD-3-Clause # lib/extra_libs/mantisconnect/pregen which is GPL-1.0-or-later # tools/adbload2/adbload2_parse_pregen.tab.c which is GPL-3.0-or-later # tools/no_yacc/cygwin/compilers which is GPL-3.0-or-later # lib/libui/ui_json/libjson.c which is LGPL-2.0-or-later # lib/libui/ui_xml which is LGPL-2.0-or-later # incl/json.h which is MIT # lib/libaubit4gl/json.c which is MIT # lib/extra_libs/memcached/memcache.h which is MIT # lib/libaubit4gl/mapm which is NTP License: GPL-2.0-or-later and GPL-3.0-or-later and GPL-1.0-or-later and LGPL-2.0-or-later and MIT and BSD-3-Clause URL: https://www.aubit.com Source0: https://downloads.sourceforge.net/aubit4gl/%{name}src.%{version}.tar.gz Source1: https://downloads.sourceforge.net/project/aubit4gl/Aubit4gl-manual/aubitmanpages.tar.bz2 # Fixes to enable building on Fedora and to replace gethostbyname with getaddressinfo Patch: PackgingGetaddrinfo.patch #Source2: https://aubit.com/aubit4gl/manuals/aubman.pdf #Source3: https://aubit.com/aubit4gl/manuals/aubitqref.pdf Requires: gcc BuildRequires: gcc BuildRequires: ncurses-devel BuildRequires: libpq-devel BuildRequires: bison flex procps-ng %description Aubit 4GL compiler is software that translates IBM Informix 4GL source code into C code, and compiles into executable programs. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel %{summary}. %prep %autosetup -n %{name}src -p1 %build # setting LDFLAGS=-pie prevents rpmlint warning # position-independent-executable-suggested on the binaries. %configure LDFLAGS=-pie \ --disable-prefix-check \ --with-smtp=no \ --without-zlib # It does not compile with multiple threads %make_build -j1 %install rm -rf %{buildroot}%{_libdir}/%{name} mkdir -p %{buildroot}%{_libdir}/%{name} mkdir -p %{buildroot}/%{_sysconfdir}/ld.so.conf.d mkdir -p %{buildroot}%{_includedir}/%{name} mkdir -p %{buildroot}%{_mandir}/man1 tar xvf %{SOURCE1} -C %{buildroot}%{_mandir}/man1 #cp %%{SOURCE2} %%{SOURCE3} %%{_builddir}/%%{name}-%%{version} # Remove the execute bit on the example files so rpmlint does not complain #chmod -x %{_builddir}/%{name}-%{version}/tools/examples/*/*.4gl %make_install PREFIX=%{buildroot}%{_libdir}/%{name} \ LIB_INSTALL_LINK=%{_builddir}/%{name}-%{version} \ BIN_INSTALL_LINK=%{_builddir}/%{name}-%{version} \ aubitrc=new # Remove files which will not be packaged, to cleanup licensing. # compilers/ace/dump_4gl.c contains: "This code is not covered by the GPL" rm %{buildroot}%{_libdir}/%{name}/bin/aace_4gl # Install header files cp -p %{buildroot}%{_libdir}/%{name}/incl/*.h %{buildroot}%{_includedir}/%{name} mkdir -p %{buildroot}/%{_includedir}/%{name}/dataio cp -p %{buildroot}%{_libdir}/%{name}/incl/dataio/*.h %{buildroot}%{_includedir}/%{name}/dataio rm -rf %{buildroot}%{_libdir}/%{name}/incl # Install the Aubit4GL library into the system library directory cp -d %{buildroot}%{_libdir}/%{name}/lib/lib%{name}.so* %{buildroot}%{_libdir} rm -rf %{buildroot}%{_libdir}/%{name}/lib # Put the Aubit4GL aubitrc config file into place. #mkdir -p %{buildroot}%{_sysconfdir} #install %{_builddir}/%{name}-%{version}/etc/aubitrc %{buildroot}%{_sysconfdir} # Fixup paths in aubitrc #sed -i -e "s|%{buildroot}||g" \ # -e "s|%{_builddir}/%{name}-%{version}|%{_libdir}/%{name}|g" \ # -e "s|^\(AUBITETC=\).*|\1%{_sysconfdir}|g" \ # %{buildroot}%{_sysconfdir}/aubitrc # Fix shebang on scripts #sed -i -e '1d' %{buildroot}%{_libdir}/%{name}/bin/report.pm #sed -i -e '1d' %{buildroot}%{_libdir}/%{name}/bin/using.pm #sed -i -e '1d;2i#!/usr/bin/bash' %{buildroot}%{_libdir}/%{name}/bin/aubit # Remove zero-length files shown as error by rpmlint #rm -f %{buildroot}%{_libdir}/%{name}/etc/import/default #rm -f %{buildroot}%{_libdir}/%{name}/tools/4glpc/settings/C #rm -f %{buildroot}%{_libdir}/%{name}/tools/4glpc/settings/C_INFORMIX #rm -f %{buildroot}%{_libdir}/%{name}/tools/4glpc/settings/EC # Install the binaries mkdir -p %{buildroot}%{_bindir} install %{buildroot}%{_libdir}/%{name}/bin/4glpc %{buildroot}%{_bindir} install %{buildroot}%{_libdir}/%{name}/bin/4glc %{buildroot}%{_bindir} install %{buildroot}%{_libdir}/%{name}/bin/fcompile %{buildroot}%{_bindir} install %{buildroot}%{_libdir}/%{name}/bin/amkmessage %{buildroot}%{_bindir} # The above binaries are required, a ticket can be filed if others are needed rm -rf %{buildroot}%{_libdir}/%{name}/bin # To avoid duplicate build-ids with libLEX_C and libLEX_CS, create a link ln -sf libLEX_C.so %{buildroot}%{_libdir}/%{name}/plugins-%{version}/libLEX_CS.so # docs are installed in the system location rm -rf %{buildroot}%{_libdir}/%{name}/docs rm -f %{buildroot}%{_libdir}/%{name}/README.txt # These should not be included in a binary install rm -f %{buildroot}%{_libdir}/%{name}/Makefile rm -f %{buildroot}%{_libdir}/%{name}/configure rm -f %{buildroot}%{_libdir}/%{name}/install.sh %check make test make -C tools/test %files %license docs/COPYING %doc docs/CREDITS %doc README.txt %doc tools/examples %dir %{_libdir}/%{name} %dir %{_libdir}/%{name}/plugins-%{version} %dir %{_libdir}/%{name}/etc %dir %{_libdir}/%{name}/tools %{_libdir}/%{name}/etc/* %{_libdir}/%{name}/tools/* %{_libdir}/%{name}/plugins-%{version}/*.so %{_libdir}/lib%{name}.so.* #%config(noreplace) %{_sysconfdir}/aubitrc %{_bindir}/4glc %{_bindir}/4glpc %{_bindir}/amkmessage %{_bindir}/fcompile %{_mandir}/man1/* %files devel %dir %{_includedir}/%{name} %dir %{_includedir}/%{name}/dataio %{_includedir}/%{name}/*.h %{_includedir}/%{name}/dataio/*.h %{_libdir}/lib%{name}.so %changelog * Wed Feb 22 2023 Chad Lemmen - 1.6.1-1 - updated to 1.6.1 * Thu Dec 29 2022 Chad Lemmen - 1.5.3-1 - initial Fedora RPM packaging