Blob Blame History Raw
%flatpak	1
%distcore       .fc%{fedora}app
# This definition of dist in terms of distcore is standard in fedora-release from F40 on, but duplicated here for F39
%dist           %{!?distprefix0:%{?distprefix}}%{expand:%{lua:for i=0,9999 do print("%{?distprefix" .. i .."}") end}}%{distcore}%{?with_bootstrap:%{__bootstrap}}
%_prefix	/app
%_sysconfdir	%{_prefix}/etc
%_localstatedir %{_prefix}/var
%build_ldflags -Wl,-z,relro %{_ld_as_needed_flags} %{_ld_symbols_flags} %{_hardened_ldflags} %{_annotation_ldflags} %[ "%{toolchain}" == "clang" ? "%{?_clang_extra_ldflags}" : "" ] %{_build_id_flags} %{?_package_note_flags} -L%{_prefix}/__LIB__
%__brp_compress		%{_usr}/lib/rpm/brp-compress /app
%__git			%{_bindir}/git
%__perl			%{_usr}/bin/perl
%__python2		%{_bindir}/python2
%python2_sitelib	%{_prefix}/lib/python2.7/site-packages
%python2_sitearch	%{_libdir}/python2.7/site-packages
%_fontbasedir		%{_datadir}/fonts

%___build_pre	\
  RPM_SOURCE_DIR=\"%{u2p:%{_sourcedir}}\"\
  RPM_BUILD_DIR=\"%{u2p:%{_builddir}}\"\
  RPM_OPT_FLAGS=\"%{optflags}\"\
  RPM_LD_FLAGS=\"%{?build_ldflags}\"\
  RPM_ARCH=\"%{_arch}\"\
  RPM_OS=\"%{_os}\"\
  RPM_BUILD_NCPUS=\"%{_smp_build_ncpus}\"\
  export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_LD_FLAGS RPM_ARCH RPM_OS RPM_BUILD_NCPUS RPM_LD_FLAGS\
  RPM_DOC_DIR=\"%{_docdir}\"\
  export RPM_DOC_DIR\
  RPM_PACKAGE_NAME=\"%{NAME}\"\
  RPM_PACKAGE_VERSION=\"%{VERSION}\"\
  RPM_PACKAGE_RELEASE=\"%{RELEASE}\"\
  export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE\
  LANG=C\
  export LANG\
  unset CDPATH DISPLAY ||:\
  %{?buildroot:RPM_BUILD_ROOT=\"%{u2p:%{buildroot}}\"\
  export RPM_BUILD_ROOT}\
  %{?_javaclasspath:CLASSPATH=\"%{_javaclasspath}\"\
  export CLASSPATH}\
  CONFIG_SITE=${CONFIG_SITE:-NONE}\
  export CONFIG_SITE\
  ACLOCAL_PATH="%{_datadir}/aclocal:%{_usr}/share/aclocal"\
  export ACLOCAL_PATH\
  CPATH="%{_prefix}/include"\
  export CPATH\
  CPLUS_INCLUDE_PATH="%{_prefix}/include"\
  export CPLUS_INCLUDE_PATH\
  C_INCLUDE_PATH="%{_prefix}/include"\
  export C_INCLUDE_PATH\
  GI_TYPELIB_PATH="%{_prefix}/__LIB__/girepository-1.0:%{_usr}/__LIB__/girepository-1.0"\
  export GI_TYPELIB_PATH\
  INFOPATH="%{_datadir}/info"\
  export INFOPATH\
  MANPATH="%{_datadir}/man:"\
  export MANPATH\
  OBJC_INCLUDE_PATH="%{_prefix}/include"\
  export OBJC_INCLUDE_PATH\
  PATH="%{_bindir}:%{_usr}/local/sbin:%{_usr}/bin:/bin:%{_usr}/sbin:/sbin"\
  PKG_CONFIG_GLADEUI_2_0_CATALOGDIR="%{_datadir}/glade/catalogs"\
  export PKG_CONFIG_GLADEUI_2_0_CATALOGDIR\
  PKG_CONFIG_PATH="%{_prefix}/__LIB__/pkgconfig:%{_datadir}/pkgconfig:%{_usr}/__LIB__/pkgconfig:%{_usr}/share/pkgconfig"\
  export PKG_CONFIG_PATH\
  XDG_CONFIG_DIRS="%{_sysconfdir}/xdg:/etc/xdg"\
  export XDG_CONFIG_DIRS\
  XDG_DATA_DIRS="%{_datadir}:%{_usr}/local/share:%{_usr}/share"\
  export XDG_DATA_DIRS\
  GVFS_REMOTE_VOLUME_MONITOR_IGNORE="1"\
  export GVFS_REMOTE_VOLUME_MONITOR_IGNORE\
  \
  %[%{verbose}?"set -x":""]\
  umask 022\
  cd \"%{u2p:%{_builddir}}\"\

# Override /usr/lib/rpm/fontconfig.prov with a version that also handles fonts
# in /app/share/fonts
%__font_provides	%{_rpmconfigdir}/fontconfig-flatpak.prov
# rpm-build's rpath script hardcodes /usr and doesn't work right for /app prefix
%__brp_check_rpaths	%{nil}