diff options
author | B. Stack <bgstack15@gmail.com> | 2022-04-16 16:51:44 +0000 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-04-16 16:51:44 +0000 |
commit | 2611ac2c41471e12a2b1e6b217322f00cb9266d1 (patch) | |
tree | 9fc348166a26334b739259b11e039570c23f1f4d /scite-fedora/scite.spec | |
parent | Merge branch 'librewolf-bump' into 'master' (diff) | |
parent | fix #29: add functions to scite stackrpms.lua (diff) | |
download | stackrpms-2611ac2c41471e12a2b1e6b217322f00cb9266d1.tar.gz stackrpms-2611ac2c41471e12a2b1e6b217322f00cb9266d1.tar.bz2 stackrpms-2611ac2c41471e12a2b1e6b217322f00cb9266d1.zip |
Merge branch 'scite-bump' into 'master'
Scite bump
Closes #29
See merge request bgstack15/stackrpms!294
Diffstat (limited to 'scite-fedora/scite.spec')
-rw-r--r-- | scite-fedora/scite.spec | 110 |
1 files changed, 76 insertions, 34 deletions
diff --git a/scite-fedora/scite.spec b/scite-fedora/scite.spec index 1b6a692..1cc96e7 100644 --- a/scite-fedora/scite.spec +++ b/scite-fedora/scite.spec @@ -1,14 +1,41 @@ -# el is on 3.x, fc is on 5.x -%global pkgversion 5.2.1 +# Tunables +# el7 is on 3.x, el8/fc is on 5.x +%global pkgversion 5.2.2 +# Use lua +%define with_lua 1 +# Use bundled lua. If 0, then use distro lua +%define with_bundled_lua 0 +# Add my custom lua script +%define with_custom_script 1 +# Choose GTK=2 or GTK=3. El6 is hardcoded to 2. +%define gtk_ 3 + +# Calculated or derived flags. Do not mess with these. %define tarballversion %( echo %pkgversion | tr -d '.' ) +%define luaflag NO_LUA=1 +%if 0%{with_lua} +%define luaflag %nil +%endif +%define gtkflag GTK3=1 +%if 0%{gtk_} == 2 +%define gtkflag %nil +%endif +# Turn off lto for local builds but leave them on for copr +%if !0%{?copr_username:1} +%global _lto_cflags %nil +%endif %global __brp_check_rpaths %{nil} - %define scl_env %{nil} %define scl_buildreq coreutils %if 0%{?el6} %define scl_env devtoolset-7 %define scl_buildreq devtoolset-7-toolchain + %define gtk_ 2 %endif +%global all_build_flags '%{?_smp_mflags} LDFLAGS="%{?__global_ldflags} -shared -dynamiclib" \ + CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" %{gtkflag} DEBUG=1 %{luaflag} libdir=%{_libdir}' +# Just for vim: +#' Name: scite Version: %{pkgversion} @@ -20,15 +47,26 @@ Url: http://www.scintilla.org/SciTE.html Packager: B. Stack <bgstack15@gmail.com> Source0: https://www.scintilla.org/scite%{tarballversion}.tgz +%if 0%{with_custom_script} +Source1: stackrpms.lua +%endif +Source2: SciTEGlobal.properties Patch0: scite-utf8.patch +%if 0%{with_lua} && !0%{with_bundled_lua} +Patch2: use-lua5.4.4.patch +%endif BuildRequires: desktop-file-utils BuildRequires: gcc-c++ BuildRequires: %{scl_buildreq} -%if !0%{?el6} +%if 0%{gtk_} == 3 BuildRequires: gtk3-devel -%endif +%else BuildRequires: gtk2-devel +%endif +%if 0%{with_lua} && !0%{with_bundled_lua} +BuildRequires: lua-devel +%endif Provides: bundled(scintilla) = %{version} @@ -38,45 +76,40 @@ Scintilla, it has grown to be a generally useful editor with facilities for building and running programs. %prep +echo "USING gtkflag=\"%{gtkflag}\"" %setup -q -c %patch0 +%if !0%{with_lua} #remove bundled lua rm -rf scite/lua +%else +%if !0%{with_bundled_lua} +# Use distro lua +rm -rf scite/lua +%patch2 -p1 +%endif +%endif %build - -%if 0%{?el6} - %if "%{?scl_env}" != "" - scl enable %{scl_env} /bin/bash <<'EOFSCL' - %endif - make %{?_smp_mflags} LDFLAGS="%{?__global_ldflags} -shared -dynamiclib" \ - CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" DEBUG=1 -C lexilla/src \ - libdir=%{_libdir} - make %{?_smp_mflags} LDFLAGS="%{?__global_ldflags} -shared -dynamiclib" \ - CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" DEBUG=1 -C scintilla/gtk \ - libdir=%{_libdir} - #Build without lua support - make %{?_smp_mflags} LDFLAGS="%{?__global_ldflags}" \ - CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" DEBUG=1 NO_LUA=1 -C scite/gtk \ - libdir=%{_libdir} - %if "%{?scl_env}" != "" +%if "%{?scl_env}" != "" + scl enable %{scl_env} /bin/bash <<'EOFSCL' +%endif +make %{?_smp_mflags} LDFLAGS="%{?__global_ldflags} -shared -dynamiclib" \ + CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" %{gtkflag} DEBUG=1 %{luaflag} -C lexilla/src \ + libdir=%{_libdir} +make %{?_smp_mflags} LDFLAGS="%{?__global_ldflags} -shared -dynamiclib" \ + CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" %{gtkflag} DEBUG=1 %{luaflag} -C scintilla/gtk \ + libdir=%{_libdir} +#Build without lua support +make %{?_smp_mflags} LDFLAGS="%{?__global_ldflags}" \ + CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" %{gtkflag} DEBUG=1 %{luaflag} -C scite/gtk \ + libdir=%{_libdir} +%if "%{?scl_env}" != "" EOFSCL - %endif -%else - make %{?_smp_mflags} LDFLAGS="%{?__global_ldflags} -shared -dynamiclib" \ - CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" GTK3=1 DEBUG=1 -C lexilla/src \ - libdir=%{_libdir} - make %{?_smp_mflags} LDFLAGS="%{?__global_ldflags} -shared -dynamiclib" \ - CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" GTK3=1 DEBUG=1 -C scintilla/gtk \ - libdir=%{_libdir} - #Build without lua support - make %{?_smp_mflags} LDFLAGS="%{?__global_ldflags}" \ - CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" GTK3=1 DEBUG=1 NO_LUA=1 -C scite/gtk \ - libdir=%{_libdir} %endif %install -make DESTDIR=%{buildroot} -C scite/gtk install libdir=%{_libdir} +make DESTDIR=%{buildroot} %{gtkflag} -C scite/gtk install libdir=%{_libdir} ln -s SciTE %{buildroot}%{_bindir}/scite # include man-page @@ -88,6 +121,10 @@ desktop-file-install --delete-original \ --remove-key Encoding \ %{buildroot}%{_datadir}/applications/SciTE.desktop +%if 0%{with_custom_script} +install -D -p -m 644 %{SOURCE1} %{buildroot}%{_datadir}/scite/stackrpms.lua +%endif +install -D -p -m 666 %{SOURCE2} %{buildroot}%{_datadir}/scite/SciTEGlobal.properties %if 0%{?fedora} %posttrans /usr/bin/update-desktop-database &> /dev/null || : @@ -110,6 +147,11 @@ desktop-file-install --delete-original \ %{_libdir}/* %changelog +* Mon Apr 04 2022 B. Stack <bgstack15@gmail.com> - 5.2.2-2/3.7.6-1 +- Update version +- Add tunables: gtk, lua, bundled lua, add stackrpms.lua +- Add customized SciTEGlobal.properties + * Thu Mar 24 2022 B. Stack <bgstack15@gmail.com> - 5.2.1-1/3.7.6-1 - Update version |