]> git.pld-linux.org Git - packages/rpm-pld-macros.git/blobdiff - macros.pld
- fix py3_ver macro for python 3.10, bump ver to 2.013
[packages/rpm-pld-macros.git] / macros.pld
index b0f4195e8a12ca869b7e89614ccb2cfd19bb7831..377d6d504eead2a1936d1706d09a0498da1fb491 100644 (file)
 # PLD Linux rpm macros.
 # <http://www.pld-linux.org/>
 
+%distribution  PLD Linux
+%vendor                pld
+%bugurl                http://bugs.pld-linux.org/
+%disturl       http://www.pld-linux.org/
+%pld_release   th
+%disttag       %{pld_release}
+
 # can be used by builder script to check for version
 %rpm_build_macros      {Revision}
 
 %epoch         0
-%x8664         x86_64 amd64 ia32e
+
+#==============================================================================
+# ---- configure macros.  note that most of these are inherited
+#      from the defaults.
+#
+%_sharedstatedir       /var/lib
+%_localstatedir                /var
+%_localedir                    %{_datadir}/locale
+%_lispdir                      %{_datadir}/emacs/site-lisp
+%_initddir                     %{_sysconfdir}/rc.d/init.d
+
+%_defaultdocdir                %{_usr}/share/doc
+
+%_fmoddir              %{_libdir}/gfortran/modules
+
+# Location of autoconf macros
+%_aclocaldir   %{expand:%%global _aclocaldir %(aclocal --print-ac-dir 2>/dev/null || echo ERROR)}%_aclocaldir
+
+# Location of omf files
+%_omf_dest_dir %{expand:%%global _omf_dest_dir %(scrollkeeper-config --omfdir || echo ERROR)}%_omf_dest_dir
+
+# Location of pkgconfig files
+%_pkgconfigdir /usr/%{_lib}/pkgconfig
+# noarch pkgconfig files
+%_npkgconfigdir        /usr/share/pkgconfig
+
+# Location of desktop files
+%_desktopdir   /usr/share/applications
+%_applnkdir    ERROR:_applnkdir_is_obsolete_use_desktopdir_instead
+
+# Location of pixmaps for applnk/desktop files
+%_pixmapsdir   /usr/share/pixmaps
+
+# Location of themable icons for applnk/desktop files
+%_iconsdir     /usr/share/icons
+
+# Location of fonts directories
+%_fontsdir     /usr/share/fonts
+
+# Location of Gtk and associated libraries documentation
+%_gtkdocdir    %{_defaultdocdir}/gtk-doc/html
+
+# Location of KDE documentation
+%_kdedocdir    %{_defaultdocdir}/kde/HTML
+
+# unsermake script
+%__unsermake /usr/share/unsermake/unsermake
+
+# Current date
+%date          %(LC_ALL=C date +"%a %b %d %Y")
+
+# Example files, programs, scripts...
+%_examplesdir  /usr/src/examples
+
+# SysV-style initscripts dir
+%_initddir             /etc/rc.d/init.d
+
+# Executed at after copying %doc to DOCDIR, with $DOCDIR set
+# TODO: teach rpm.org that compressed %doc is the same thing as uncompressed
+#__compress_doc                %{_rpmconfigdir}/compress-doc%{?_noautocompressdoc: --noautocompressdoc='%{_noautocompressdoc}'}
+
+%__os_install_post \
+%{__spec_install_post_strip}\
+%{__spec_install_post_chrpath}\
+%{__spec_install_post_compress_modules}\
+%{__spec_install_post_check_so}\
+%{__spec_install_post_check_tmpfiles}\
+%{__spec_install_post_check_shebangs}\
+%{__spec_install_post_compress_docs}\
+%{__spec_install_post_py_hardlink}\
+%{__spec_install_post_perl_clean}\
+%{__arch_install_post}\
+%{nil}
+
+%__spec_install_post\
+%{expand:%%define __sip_%{?_enable_debug_packages} 1}%{?__sip_1:%{?__debug_package:%{__debug_install_post}}}%{expand:%%undefine __sip_%{?_enable_debug_packages}}\
+%{__arch_install_post}\
+%{__os_install_post}\
+%{nil}
+
+#---------------------------------------------------------------------
+#      Template for debug information sub-package.
+%_enable_debug_packages                1
+
+%_debuginfo_template \
+%package debuginfo\
+Summary: Debug information for package %{name}\
+Summary(pl.UTF-8): Informacje dla debuggera dla pakietu %{name}\
+Group: Development/Debug\
+Requires: filesystem-debuginfo >= 3.0-16\
+AutoReqProv: 0\
+%description debuginfo\
+This package provides debug information for package %{name}.\
+Debug information is useful when developing applications that use this\
+package or when debugging this package.\
+%description debuginfo -l pl.UTF-8\
+Ten pakiet dostarcza informacje dla debuggera dla pakietu %{name}.\
+Informacje te są przydatne przy rozwijaniu aplikacji używających tego\
+pakietu oraz przy odpluskwianiu samego pakietu.\
+%files debuginfo -f debugfiles.list\
+%defattr(-,root,root)\
+%{nil}
+
+%_debugsource_template \
+%package debugsource\
+Summary: Debug sources for package %{name}\
+Summary(pl.UTF-8): Źródła dla debuggera dla pakietu %{name}\
+Group: Development/Debug\
+AutoReqProv: 0\
+%description debugsource\
+This package provides debug sources for package %{name}.\
+Debug sources are useful when developing applications that use this\
+package or when debugging this package.\
+%description debugsource -l pl.UTF-8\
+Ten pakiet dostarcza źródła dla debuggera dla pakietu %{name}.\
+Źródła te są przydatne przy rozwijaniu aplikacji używających tego\
+pakietu oraz przy odpluskwianiu samego pakietu.\
+%files debugsource -f debugsourcefiles.list\
+%{nil}
+
+%debug_package \
+%ifnarch noarch\
+%global __debug_package 1\
+%_debuginfo_template\
+%if 0%{?_debugsource_packages}\
+%_debugsource_template\
+%endif\
+%endif\
+%{nil}
+
+#---------------------------------------------------------------------
+# Overwrite RPM macros with PLD specific one here.
+
+%__find                        /usr/bin/find
+%__lua                 %{_bindir}/lua
+%__rc                  %{_bindir}/rc
+%__xar                 %{_bindir}/xar
+
+%_source_payload       w9.gzdio
+%_binary_payload       w6.xzdio
+
+%_rpmfc_magic_path     /usr/share/file/magic
+
+# provides don't obsolete
+%_upgrade_tag          name
+
+# Disable automatic dependencies on symlinks for now (debuginfo packages pull too many deps)
+%_check_symlink_deps    0 
+# Do not generate executable() dependencies for scriptlets,
+# as it may give false positives, for example:
+# [ ! -x /bin/prog ] || /bin/prog
+# will generate R:/bin/prog and we don't want that as /bin/prog is optional in this case
+# 0 - Use external generator
+# 1 - Use internal generator if available
+# 2 - Use __scriptlet_requires to process scriptlet dependencies
+%_use_internal_dependency_generator    1
+
+%_duplicate_files_terminate_build      1
+%_files_listed_twice_terminate_build   1
+%_unpackaged_files_terminate_build     0
+%_unpackaged_subdirs_terminate_build   0
+
+#
+# Export package NEVRA (stamped with install tid) info for HRMIB on this path.
+#
+# XXX  Note: escaped %% for use in headerSprintf()
+%_hrmib_path   /var/cache/hrmib/%{___NVRA}
+
+#-----------------------------------------------------------------
+# CFLAGS and LDFLAGS used to build
+
+%debuginfocflags       %{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1: -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2}%{expand:%%undefine __dic_%{?_enable_debug_packages}}
+# -feliminate-dwarf2-dups disabled until PR ld/3290 is fixed.
+
+%debugcflags   -O0 -g -Wall
+%debugcppflags %{nil}
+%debugldflags  %{nil}
+
+%optldflags    -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc %{?use_ld:-Wl,-fuse-ld=%{use_ld}}
+%optcppflags   %{nil}
+
+# common compilation flags
+%_fortify_cflags       -Wp,-D_FORTIFY_SOURCE=2
+
+# cf http://wiki.mandriva.com/en/Development/Packaging/Problems#format_not_a_string_literal_and_no_format_arguments
+%Werror_cflags         -Wformat -Werror=format-security
+
+# Use -Werror=trampolines to prevent GCC from generating code that require executable stack
+%_ssp_cflags           -fstack-protector-strong --param=ssp-buffer-size=4 -Werror=trampolines
+%__common_cflags       -O2 -fwrapv -pipe %{Werror_cflags} %{debuginfocflags} %{?_fortify_cflags} %{!?nospecflags:%{?specflags}}
+%__common_cflags_with_ssp      %{__common_cflags} %{?_ssp_cflags}
+
+# arch macros
+%ix86  i386 i486 i586 i686 pentium3 pentium4 athlon geode
+%x8664 x86_64 amd64 ia32e
+%ppc   ppc ppc7400 ppc7450
+
+# avoid fdatasync syscall flood during database operations.
+%__nofsync     nofsync
+
+#---------------------------------------------------------------------
+#      Expanded at end of %prep
+#
+%__chown_Rhf   %{__chown} -Rhf
+%__chgrp_Rhf   %{__chgrp} -Rhf
+%_fixowner     [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root
+%_fixgroup     [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} root
 
 # compiler version
 %cc_version    %{expand:%%global cc_version %(%{__cc} -dumpversion 2>/dev/null || echo 0.0)}%cc_version
 %__rm          /bin/rm --interactive=never
 
 # Build system path macros.
-%__autoconf    autoconf %{?debug:-Wall}
-%__automake    automake -a -c -f --foreign
+%__autoconf            autoconf %{?debug:-Wall}
+%__automake            automake -a -c -f --foreign
 %__autopoint   autopoint --force
+%__aclocal             aclocal
+%__autoheader  autoheader
 
 # add parallel build flags: -jN
 # jobs macro is available since 1.657
 %__make                /usr/bin/make %{?_make_opts} %{?_smp_mflags}
 %__scons       /usr/bin/scons %{?_smp_mflags}
 %__waf         /usr/bin/waf %{?_smp_mflags}
-%__cmake       /usr/bin/cmake -Wno-dev
+%__cmake       /usr/bin/cmake
 %__meson       /usr/bin/meson
 %__meson_wrap_mode     nodownload
 %__ninja       /usr/bin/ninja
        fi; \
 )}%_topdir
 
+%_tmppath              %(echo "${TMPDIR:-/var/tmp}")
+%tmpdir                        %{_tmppath}
+
+%_buildrootdir %{_tmppath}
+%buildroot             %{_buildrootdir}/%{name}-%{version}-%{_arch}-root-%(id -u -n)
+
 # if %{_topdir}/SPECS exists, it's old style structure
 %_specdir              %{expand:%%global _specdir %([ ! -d %{_topdir}/SPECS ] && echo %{_topdir}/%{name} || echo %{_topdir}/SPECS)}%_specdir
 %_sourcedir            %{expand:%%global _sourcedir %([ ! -d %{_topdir}/SOURCES ] && echo %{_specdir} || echo %{_topdir}/SOURCES)}%_sourcedir
 %{?__cxx:CXX="${CXX:-%{__cxx}}"} \\\
 CPPFLAGS="${CPPFLAGS:-%{rpmcppflags}}" \\\
 %{__cmake} \\\
-       -DCMAKE_VERBOSE_MAKEFILE=ON \\\
+       -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\
        -DCMAKE_BUILD_TYPE=%{!?debug:PLD}%{?debug:Debug} \\\
        -DCMAKE_INSTALL_BINDIR:PATH=%{_bindir} \\\
        -DCMAKE_INSTALL_SBINDIR:PATH=%{_sbindir} \\\
@@ -429,6 +651,10 @@ LC_ALL=C.UTF-8 %{__meson} \
 %__true_false() %{expand:%%{?with_%{1}:true}%%{!?with_%{1}:false}}
 %__true_false_not() %{expand:%%{?with_%{1}:false}%%{!?with_%{1}:true}}
 
+# expands to enabled or disabled based on bcond; for use with meson or cmake
+%__enabled_disabled() %{expand:%%{?with_%{1}:enabled}%%{!?with_%{1}:disabled}}
+%__enabled_disabled_not() %{expand:%%{?with_%{1}:disabled}%%{!?with_%{1}:enabled}}
+
 # for use with cmake:
 # Usage: cmake_on_off BCOND_NAME [OPTION_NAME]
 # BuildRequires: rpmbuild(macros) >= 1.742
@@ -444,47 +670,7 @@ LC_ALL=C.UTF-8 %{__meson} \
 %%prep\
 %{nil}
 
-# Location of autoconf macros
-%_aclocaldir   %{expand:%%global _aclocaldir %(aclocal --print-ac-dir 2>/dev/null || echo ERROR)}%_aclocaldir
-
-# Location of omf files
-%_omf_dest_dir %{expand:%%global _omf_dest_dir %(scrollkeeper-config --omfdir || echo ERROR)}%_omf_dest_dir
-
-# Location of pkgconfig files
-%_pkgconfigdir /usr/%{_lib}/pkgconfig
-# noarch pkgconfig files
-%_npkgconfigdir        /usr/share/pkgconfig
-
-# Location of desktop files
-%_desktopdir   /usr/share/applications
-%_applnkdir    ERROR:_applnkdir_is_obsolete_use_desktopdir_instead
-
-# Location of pixmaps for applnk/desktop files
-%_pixmapsdir   /usr/share/pixmaps
-
-# Location of themable icons for applnk/desktop files
-%_iconsdir     /usr/share/icons
-
-# Location of fonts directories
-%_fontsdir     /usr/share/fonts
-
-# Location of Gtk and associated libraries documentation
-%_gtkdocdir    %{_defaultdocdir}/gtk-doc/html
-
-# Location of KDE documentation
-%_kdedocdir    %{_defaultdocdir}/kde/HTML
-
-# unsermake script
-%__unsermake /usr/share/unsermake/unsermake
-
-# Current date
-%date          %(LC_ALL=C date +"%a %b %d %Y")
-
-# Example files, programs, scripts...
-%_examplesdir  /usr/src/examples
-
-# SysV-style initscripts dir
-%_initddir             /etc/rc.d/init.d
+%_build_id_links       %{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1:alldebug}%{?__dic_0:none}%{expand:%%undefine __dic_%{?_enable_debug_packages}}
 
 # If non-empty "debug" macro defined, add "dbg" suffix to release number
 %_rpmfilename          %%{NAME}-%%{VERSION}-%%{RELEASE}%{?debug:dbg}.%%{ARCH}.rpm
@@ -516,6 +702,17 @@ LC_ALL=C.UTF-8 %{__meson} \
 Obsoletes: %{1} < %{?epoch:%{epoch}:}%{?version:%{version}}%{?release:-%{release}} \
 Provides: %{1} = %{?epoch:%{epoch}:}%{?version:%{version}}%{?release:-%{release}}
 
+# for package versions comparison (incl. cc_version or _rpmversion)
+# BuildRequires:       rpmbuild(macros) >= 1.749
+%_ver_lt()     %(test $(rpmvercmp "%{1}" "%{2}" >/dev/null 2>&1; echo $?) -ne 2; echo $?)
+%_ver_ge()     %(test $(rpmvercmp "%{1}" "%{2}" >/dev/null 2>&1; echo $?) -eq 2; echo $?)
+
+# noarch subpackage helper
+# BuildRequires:       rpmbuild(macros) >= 1.752
+%noarchpackage \
+BuildArch:             noarch \
+%{nil}
+
 %apache_modules_api %{expand:%%global apache_modules_api %(awk '/#define MODULE_MAGIC_NUMBER_MAJOR/ {print $3}' /usr/include/apache/ap_mmn.h 2>/dev/null || echo ERROR)}%apache_modules_api
 
 # sgml macros
@@ -807,9 +1004,9 @@ __spec_install_post_check_tmpfiles() { \
 %__spec_install_post_check_shebangs { \
 __spec_install_post_check_shebangs() { \
 %{!?debug:set +x;} \
-       fail=0; \
        echo "Checking script shebangs..."; \
-       for f in $(find $RPM_BUILD_ROOT -type f -perm -500 -print); do \
+       fail=` \
+       find $RPM_BUILD_ROOT -type f -perm -500 -print | { fail=0; while IFS= read -r f; do \
                shebang="$(sed -e'1s/#! *\(.*\)/\1/;t;d;q' "$f")" ; \
                f="${f##$RPM_BUILD_ROOT}"; \
                case "$shebang" in \
@@ -828,6 +1025,8 @@ __spec_install_post_check_shebangs() { \
                        *) ;;\
                esac ; \
        done ; \
+       echo "$fail" ; \
+       }`; \
        echo " DONE" ; \
         %{!?no_install_post_check_shebangs:return $fail;} \
 }; __spec_install_post_check_shebangs }}
@@ -939,6 +1138,14 @@ fi; \
 };} \
 %{nil}
 
+# BuildRequires:       rpmbuild(macros) >= 1.751
+# Requires(post,postun):       /usr/bin/texhash        # if you want to ensure cache is updated
+%texhash() {{ \
+       umask 022; \
+       /usr/bin/texhash >&2; \
+};} \
+%{nil}
+
 #-----------------------------------------------------------------
 # post %install sequence:
 # - autodeps exceptions
@@ -952,7 +1159,6 @@ fi; \
 #
 %__noautoreqfiles      %(sed -e s'/#.*//' /etc/rpm/noautoreqfiles)%{?_noautoreqfiles: %{_noautoreqfiles}}
 %__noautoprovfiles     %(sed -e s'/#.*//' /etc/rpm/noautoprovfiles)%{?_noautoprovfiles: %{_noautoprovfiles}}
-%__noautoreqdep                %(sed -e s'/#.*//' /etc/rpm/noautoreqdep)%{?_noautoreqdep: %{_noautoreqdep}}
 %__noautoprov          %(sed -e s'/#.*//' /etc/rpm/noautoprov) \
        %{?_noautoprov: %{_noautoprov}} \
        %{?_noautoprov_java: %{__noauto_regexp_helper -p java %{_noautoprov_java}}} \
@@ -964,6 +1170,7 @@ fi; \
        %{nil}
 %__noautoreq           %(sed -e s'/#.*//' /etc/rpm/noautoreq) \
        %{?_noautoreq: %{_noautoreq}} \
+       %{?_noautoreqdep: %{_noautoreqdep}} \
        %{?_noautoreq_java: %{__noauto_regexp_helper -p java %{_noautoreq_java}}} \
        %{?_noautoreq_mono: %{__noauto_regexp_helper -p mono %{_noautoreq_mono}}} \
        %{?_noautoreq_pear: %{__noauto_regexp_helper -p pear %{_noautoreq_pear}}} \
@@ -972,6 +1179,27 @@ fi; \
        %{?_noautoreq_py3egg: %{__noauto_regexp_helper -p python3egg %{_noautoreq_py3egg}}} \
        %{nil}
 
+%__noautodep_helper() %(awk -v x="%*" 'BEGIN {
+       RS = "\n([ \t]+\n)+";
+       FS = " ";
+       split(x, F);
+       if (length(F) > 0) {
+               printf("(");
+               for (i=1; i<=length(F); i++) {
+                       s = F[i];
+                       sub(/#.*/, "z&z", s);
+                       if (s ~ /^$/) { continue; };
+                       printf(s);
+                       if (i != length(F)) { printf("|"); };
+               };
+               printf(")");
+       }
+}')
+%__requires_exclude_from       %{__noautodep_helper %{__noautoreqfiles}}%{nil}
+%__provides_exclude_from       %{__noautodep_helper %{__noautoprovfiles}}%{nil}
+%__requires_exclude                    %{__noautodep_helper %{__noautoreq}}%{nil}
+%__provides_exclude                    %{__noautodep_helper %{__noautoprov}}%{nil}
+
 # helper for wrapping _noautoreq between perl() or pear()
 # Author: Elan Ruusamäe <glen@pld-linux.org>
 # Usage:
@@ -1003,279 +1231,6 @@ fi; \
 #
 %_missing_doc_files_terminate_build    1%{nil}
 %_unpackaged_files_terminate_build     %{nil}
-# (X)emacs support
-%___emacs_lispdir_helper -batch -q -eval '(while load-path (princ (concat (car load-path) "\\n")) (setq load-path (cdr load-path)))' 2> /dev/null|sed -n '/\\(.*\\/x\\?emacs\\/site-lisp\\)\\/\\?$/{s,,\\1,p;q;}'
-%_emacs_lispdir %{expand:%%global _emacs_lispdir %(Z=$(emacs %___emacs_lispdir_helper); echo ${Z:-ERROR})}%_emacs_lispdir
-%_xemacs_lispdir %{expand:%%global _xemacs_lispdir %(Z=$(xemacs %___emacs_lispdir_helper); echo ${Z:-ERROR})}%_xemacs_lispdir
-
-%__php_provides        %{nil}
-%__php_requires %{nil}
-%__perl_provides %{nil}
-%__perl_requires %{nil}
-%__mono_provides %{nil}
-%__mono_requires %{nil}
-
-# Perl specific macro definitions.
-%perl_privlib          %{expand:%%global perl_privlib %(eval $(%{__perl} -V:installprivlib 2>/dev/null); echo ${installprivlib:-ERROR})}%perl_privlib
-%perl_archlib          %{expand:%%global perl_archlib %(eval $(%{__perl} -V:installarchlib 2>/dev/null); echo ${installarchlib:-ERROR})}%perl_archlib
-%perl_vendorlib                %{expand:%%global perl_vendorlib %(eval $(%{__perl} -V:installvendorlib 2>/dev/null); echo ${installvendorlib:-ERROR})}%perl_vendorlib
-%perl_vendorarch       %{expand:%%global perl_vendorarch %(eval $(%{__perl} -V:installvendorarch 2>/dev/null); echo ${installvendorarch:-ERROR})}%perl_vendorarch
-%perl_sitelib          %{expand:%%global perl_sitelib %(eval $(%{__perl} -V:installsitelib 2>/dev/null); echo ${installsitelib:-ERROR})}%perl_sitelib
-%perl_sitearch         %{expand:%%global perl_sitearch %(eval $(%{__perl} -V:installsitearch 2>/dev/null); echo ${installsitearch:-ERROR})}%perl_sitearch
-
-# Ruby
-%__ruby                                /usr/bin/ruby
-
-# Ruby ABI version
-# NOTE: %ruby_version may be empty, depending how Ruby was built
-%ruby_abi                      %{expand:%%global ruby_abi %(%{__ruby} -r rbconfig -e 'print [RbConfig::CONFIG["MAJOR"], RbConfig::CONFIG["MINOR"]].join(".")' 2>/dev/null || echo ERROR)}%ruby_abi
-
-# get rbconfig parameter
-%__ruby_rbconfig()     %(%{__ruby} -r rbconfig -e 'print RbConfig::CONFIG["%1"]' 2>/dev/null || echo ERROR)
-%__ruby_rbconfig_path()        %(%{__ruby} -r rbconfig -r pathname -e 'print Pathname(RbConfig::CONFIG["%1"]).cleanpath' 2>/dev/null || echo ERROR)
-
-%ruby_archdir          %{expand:%%global ruby_archdir %{__ruby_rbconfig_path archdir}}%ruby_archdir
-%ruby_libdir           %{expand:%%global ruby_libdir %{__ruby_rbconfig rubylibdir}}%ruby_libdir
-%ruby_ridir                    %{expand:%%global ruby_ridir %(%{__ruby} -r rbconfig -e 'print File.join(RbConfig::CONFIG["datadir"], "ri", "system")' 2>/dev/null || echo ERROR)}%ruby_ridir
-%ruby_rubylibdir       %{expand:%%global ruby_rubylibdir %{__ruby_rbconfig_path rubylibdir}}%ruby_rubylibdir
-%ruby_vendorarchdir    %{expand:%%global ruby_vendorarchdir %{__ruby_rbconfig vendorarchdir}}%ruby_vendorarchdir
-%ruby_vendorlibdir     %{expand:%%global ruby_vendorlibdir %{__ruby_rbconfig_path vendorlibdir}}%ruby_vendorlibdir
-%ruby_sitearchdir      %{expand:%%global ruby_sitearchdir %{__ruby_rbconfig sitearchdir}}%ruby_sitearchdir
-%ruby_sitedir          %{expand:%%global ruby_sitedir %{__ruby_rbconfig sitedir}}%ruby_sitedir
-%ruby_sitelibdir       %{expand:%%global ruby_sitelibdir %{__ruby_rbconfig_path sitelibdir}}%ruby_sitelibdir
-%ruby_rdocdir          /usr/share/rdoc
-%ruby_vendordir                %{expand:%%global ruby_vendordir %{__ruby_rbconfig vendordir}}%ruby_vendordir
-%ruby_version          %{expand:%%global ruby_version %(r=%{__ruby_rbconfig ruby_version}; echo ${r:-%%nil})}%ruby_version
-
-%ruby_gemdir           %{expand:%%global ruby_gemdir %(%{__ruby} -r rubygems -e 'puts Gem.respond_to?(:default_dirs) ? Gem.default_dirs[:system][:gem_dir] : Gem.path.first' 2>/dev/null || echo ERROR)}%{ruby_gemdir}
-%ruby_specdir          %{ruby_gemdir}/specifications
-
-# deprecated, ruby 2.0 noarch packages are versionless and extension dependency is generated by rpm5
-%ruby_ver_requires_eq  %{nil}
-%ruby_mod_ver_requires_eq      %{nil}
-
-%php_pear_dir          /usr/share/pear
-%php_data_dir          /usr/share/php
-%php_extensiondir      %{expand:%%global php_extensiondir %(php-config --extension-dir 2>/dev/null || echo ERROR)}%php_extensiondir
-%php_sysconfdir                %{expand:%%global php_sysconfdir %(php-config --sysconfdir 2>/dev/null || echo ERROR)}%php_sysconfdir
-%php_includedir                %{expand:%%global php_includedir %(php-config --include-dir 2>/dev/null || echo ERROR)}%php_includedir
-
-# extract php/zend api versions
-%php_major_version             %{expand:%%global php_major_version %(awk '/#define PHP_MAJOR_VERSION/{print $3}' %{php_includedir}/main/php_version.h 2>/dev/null || echo ERROR)}%php_major_version
-%php_minor_version             %{expand:%%global php_minor_version %(awk '/#define PHP_MINOR_VERSION/{print $3}' %{php_includedir}/main/php_version.h 2>/dev/null || echo ERROR)}%php_minor_version
-%php_api_version               %{expand:%%global php_api_version %(awk '/#define PHP_API_VERSION/{print $3}' %{php_includedir}/main/php.h 2>/dev/null || echo ERROR)}%php_api_version
-%php_pdo_api_version   %{expand:%%global php_pdo_api_version %(awk '/#define PDO_DRIVER_API/{print $3}' %{php_includedir}/ext/pdo/php_pdo_driver.h 2>/dev/null || echo ERROR)}%php_pdo_api_version
-%php_debug                             %{expand:%%global php_debug %(awk '/#define ZEND_DEBUG/{print $3}' %{php_includedir}/main/php_config.h 2>/dev/null || echo ERROR)}%php_debug
-%zend_module_api               %{expand:%%global zend_module_api %(awk '/#define ZEND_MODULE_API_NO/{print $3}' %{php_includedir}/Zend/zend_modules.h 2>/dev/null || echo ERROR)}%zend_module_api
-%zend_extension_api            %{expand:%%global zend_extension_api %(awk '/#define ZEND_EXTENSION_API_NO/{print $3}' %{php_includedir}/Zend/zend_extensions.h 2>/dev/null || echo ERROR)}%zend_extension_api
-%_zend_zts                             %{expand:%%global _zend_zts %(Z=$(grep -sc '^#define ZTS 1' %{php_includedir}/main/php_config.h); echo ${Z:-ERROR})}%_zend_zts
-# "_ts" if ZTS enabled, empty otherwise
-%zend_zts                              %{expand:%%global _zend_zts_%{?_zend_zts} 1}%{?_zend_zts_1:_ts}
-
-# name of php package
-%php_name                              php%{?php_suffix}
-# use rpmbuild -D 'php_suffix 54' to build php extension for php 5.4
-# NOTE: error output must be empty. otherwise can't build pecl packages if no php*-devel is installed
-%php_suffix                            %{expand:%%global php_suffix %(c=$(php-config --sysconfdir 2>/dev/null) || echo '' && echo ${c#/etc/php})%%{nil}}%php_suffix
-
-# phpXY, version always present for using current php version (in regards of php*-devel package)
-%php_versuffix                 %{expand:%%global php_versuffix %((IFS=.; set -- $(php-config --version); echo $1$2))%%{nil}}%php_versuffix
-
-# php cli. version that php headers are installed for
-%__php                                 /usr/bin/php%{php_versuffix}
-
-# helper macro
-%__php_api_requires() Requires: %{php_name}(%{expand:%1}) = %{expand:%{%{!?2:%{1}}%{?2}}}
-
-# macros for public use
-# for php extensions (php-pecl)
-%requires_php_extension %{__php_api_requires modules_api php_api_version} \
-%{__php_api_requires zend_module_api} \
-%{__php_api_requires debug php_debug} \
-%{__php_api_requires thread-safety _zend_zts}
-
-# for zend extensions
-%requires_zend_extension %{__php_api_requires zend_module_api} \
-%{__php_api_requires zend_extension_api} \
-%{__php_api_requires debug php_debug} \
-%{__php_api_requires thread-safety _zend_zts}
-
-# for php pdo modules (php-pecl-PDO_*)
-%requires_php_pdo_module %{__php_api_requires PDO_API php_pdo_api_version}
-
-# for using PHP post scripts. for PHP >= 5.0
-%php_webserver_restart \
-[ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart \
-[ ! -f /etc/httpd/conf.d/??_mod_php.conf ] || %service -q httpd restart \
-if [ -x /etc/rc.d/init.d/php-fcgi ]; then \
-       PHP_FCGI_BINARY=; . /etc/sysconfig/php-fcgi 2>/dev/null \
-       if [[ ${PHP_FCGI_BINARY:-php.fcgi} = *php.fcgi* ]]; then \
-               %service -q php-fcgi restart \
-       fi \
-fi \
-if [ -x /etc/rc.d/init.d/%{php_name}-fpm ]; then \
-       %service -q %{php_name}-fpm restart \
-fi \
-%{nil}
-
-# for using php post scripts. for PHP >= 4.0 && PHP < 5.0
-%php4_webserver_restart \
-[ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart \
-[ ! -f /etc/httpd/conf.d/??_mod_php4.conf ] || %service -q httpd restart \
-if [ -x /etc/rc.d/init.d/php-fcgi ]; then \
-       PHP_FCGI_BINARY=; . /etc/sysconfig/php-fcgi 2>/dev/null \
-       if [[ ${PHP_FCGI_BINARY:-php.fcgi} = *php4.fcgi* ]]; then \
-               %service -q php-fcgi restart \
-       fi \
-fi \
-%{nil}
-
-# X.org helper macros
-%__xorg_abi_requires_ge() Requires: xorg-xserver-server(%{expand:%1}-abi) >= %{expand:%{%2}}
-%__xorg_abi_requires_lt() Requires: xorg-xserver-server(%{expand:%1}-abi) < %(awk -vv=%{expand:%{%2}} 'BEGIN{split(v, a, "."); printf("%s.0", a[1] + 1); exit}')
-
-%xorg_xserver_ansic_abi                %{expand:%%global xorg_xserver_ansic_abi %(awk '/#define ABI_ANSIC_VERSION/ { split($0,A,/[(,)]/); printf("%d.%d",A[2], A[3]); }' /usr/include/xorg/xf86Module.h 2> /dev/null || echo ERROR)}%xorg_xserver_ansic_abi
-%xorg_xserver_extension_abi    %{expand:%%global xorg_xserver_extension_abi %(awk '/#define ABI_EXTENSION_VERSION/ { split($0,A,/[(,)]/); printf("%d.%d",A[2], A[3]); }' /usr/include/xorg/xf86Module.h 2> /dev/null || echo ERROR)}%xorg_xserver_extension_abi
-%xorg_xserver_font_abi         %{expand:%%global xorg_xserver_font_abi %(awk '/#define ABI_FONT_VERSION/ { split($0,A,/[(,)]/); printf("%d.%d",A[2], A[3]); }' /usr/include/xorg/xf86Module.h 2> /dev/null | echo ERROR)}%xorg_xserver_font_abi
-%xorg_xserver_videodrv_abi     %{expand:%%global xorg_xserver_videodrv_abi %(awk '/#define ABI_VIDEODRV_VERSION/ { split($0,A,/[(,)]/); printf("%d.%d",A[2], A[3]); }' /usr/include/xorg/xf86Module.h 2> /dev/null || echo ERROR)}%xorg_xserver_videodrv_abi
-%xorg_xserver_xinput_abi       %{expand:%%global xorg_xserver_xinput_abi %(awk '/#define ABI_XINPUT_VERSION/ { split($0,A,/[(,)]/); printf("%d.%d",A[2], A[3]); }' /usr/include/xorg/xf86Module.h 2> /dev/null || echo ERROR)}%xorg_xserver_xinput_abi
-# vim: '
-
-%requires_xorg_xserver_extension \
-%{__xorg_abi_requires_ge ansic xorg_xserver_ansic_abi} \
-%{__xorg_abi_requires_lt ansic xorg_xserver_ansic_abi} \
-%{__xorg_abi_requires_ge extension xorg_xserver_extension_abi} \
-%{__xorg_abi_requires_lt extension xorg_xserver_extension_abi} \
-%{nil}
-
-%requires_xorg_xserver_xinput \
-%{__xorg_abi_requires_ge ansic xorg_xserver_ansic_abi} \
-%{__xorg_abi_requires_lt ansic xorg_xserver_ansic_abi} \
-%{__xorg_abi_requires_ge xinput xorg_xserver_xinput_abi} \
-%{__xorg_abi_requires_lt xinput xorg_xserver_xinput_abi} \
-%{nil}
-
-%requires_xorg_xserver_font \
-%{__xorg_abi_requires_ge ansic xorg_xserver_ansic_abi} \
-%{__xorg_abi_requires_lt ansic xorg_xserver_ansic_abi} \
-%{__xorg_abi_requires_ge font xorg_xserver_font_abi} \
-%{__xorg_abi_requires_lt font xorg_xserver_font_abi} \
-%{nil}
-
-%requires_xorg_xserver_videodrv \
-%{__xorg_abi_requires_ge ansic xorg_xserver_ansic_abi} \
-%{__xorg_abi_requires_lt ansic xorg_xserver_ansic_abi} \
-%{__xorg_abi_requires_ge videodrv xorg_xserver_videodrv_abi} \
-%{__xorg_abi_requires_lt videodrv xorg_xserver_videodrv_abi} \
-%{nil}
-
-# TCL specific macro definitions.
-# TODO: when th tcl is fixed use tclsh to get version: %(echo 'puts $tcl_version' | tclsh)
-%tcl_version   %{expand:%%global tcl_version %(v=$(rpm -q --qf %{V} tcl | cut -d. -f1,2); echo ${v:-ERROR})}%tcl_version
-%tcl_sitearch  %{_libdir}/tcl%{tcl_version}
-%tcl_sitelib   %{_datadir}/tcl%{tcl_version}
-
-# Python specific macro definitions.
-# python main version
-%py_ver                        %{expand:%%global py_ver %(%{__python} -c "import sys; print sys.version[:3]" 2>/dev/null || echo ERROR)}%py_ver
-
-# directories
-%py_prefix             %{expand:%%global py_prefix %(%{__python} -c "import sys; print sys.prefix" 2>/dev/null || echo ERROR)}%py_prefix
-%py_libdir             %{py_prefix}/%{_lib}/python%{py_ver}
-%py_scriptdir  %{py_prefix}/share/python%{py_ver}
-%py_incdir             /usr/include/python%{py_ver}
-%py_sitedir            %{py_libdir}/site-packages
-%py_sitescriptdir %{py_scriptdir}/site-packages
-%py_dyndir             %{py_libdir}/lib-dynload
-
-# pure python modules compilation
-%py_comp               python -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
-
-%py_ocomp              python -O -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
-
-# Software written in Python language require Python with main version
-%pyrequires_eq() Requires:     %1
-
-# Python 3.x
-# python main version
-%__python3                     /usr/bin/python3
-%py3_ver                       %{expand:%%global py3_ver %(%{__python3} -c "import sys; print(sys.version[:3])" 2>/dev/null || echo ERROR)}%py3_ver
-
-# directories
-%py3_prefix            %{expand:%%global py3_prefix %(%{__python3} -c "import sys; print(sys.prefix)" 2>/dev/null || echo ERROR)}%py3_prefix
-%py3_incdir            %{expand:%%global py3_incdir %(%{__python3} -c "import sysconfig; print(sysconfig.get_path('include'))" 2>/dev/null || echo ERROR)}%py3_incdir
-%py3_libdir            %{py3_prefix}/%{_lib}/python%{py3_ver}
-%py3_sitedir   %{py3_libdir}/site-packages
-%py3_sitescriptdir %{py3_prefix}/share/python%{py3_ver}/site-packages
-%py3_dyndir            %{py3_libdir}/lib-dynload
-
-# pure python modules compilation
-%py3_comp              %{__python3} -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
-
-%py3_ocomp             %{__python3} -O -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
-
-%py_build { \
-       LDFLAGS="${LDFLAGS:-%rpmldflags}"; export LDFLAGS; \
-       CFLAGS="${CFLAGS:-%rpmcppflags %rpmcflags}"; export CFLAGS; \
-       CXXFLAGS="${CXXFLAGS:-%rpmcppflags %rpmcxxflags}"; export CXXFLAGS; \
-       %{?__cc:CC="%{__cc}"; export CC;} \
-       %{?__cxx:CXX="%{__cxx}"; export CXX;} \
-       %{__python} setup.py \
-                               build --build-base=build-2 \
-}
-
-# "shrink" filter to keep this macro without newlines,
-# so it could be used as make arguments
-%py_install_opts() %{shrink: \
-       --prefix=%{_prefix} \
-       --install-purelib=%{py_sitescriptdir} \
-       --install-platlib=%{py_sitedir} \
-       --optimize=2 \
-}
-
-%py_install { \
-       LDFLAGS="${LDFLAGS:-%rpmldflags}"; export LDFLAGS; \
-       CFLAGS="${CFLAGS:-%rpmcppflags %rpmcflags}"; export CFLAGS; \
-       CXXFLAGS="${CXXFLAGS:-%rpmcppflags %rpmcxxflags}"; export CXXFLAGS; \
-       %{?__cc:CC="%{__cc}"; export CC;} \
-       %{?__cxx:CXX="%{__cxx}"; export CXX;} \
-       %{__python} setup.py \
-                               build --build-base=build-2 \
-                               install --skip-build \
-                               %{py_install_opts} \
-                               --root=$RPM_BUILD_ROOT \
-}
-
-%py3_build { \
-       LDFLAGS="${LDFLAGS:-%rpmldflags}"; export LDFLAGS; \
-       CFLAGS="${CFLAGS:-%rpmcppflags %rpmcflags}"; export CFLAGS; \
-       CXXFLAGS="${CXXFLAGS:-%rpmcppflags %rpmcxxflags}"; export CXXFLAGS; \
-       %{?__cc:CC="%{__cc}"; export CC;} \
-       %{?__cxx:CXX="%{__cxx}"; export CXX;} \
-       %{__python3} setup.py build --build-base=build-3 \
-}
-
-# "shrink" filter to keep this macro without newlines,
-# so it could be used as make arguments
-%py3_install_opts() %{shrink: \
-       --prefix=%{_prefix} \
-       --install-purelib=%{py3_sitescriptdir} \
-       --install-platlib=%{py3_sitedir} \
-       --optimize=2 \
-}
-
-%py3_install { \
-       LDFLAGS="${LDFLAGS:-%rpmldflags}"; export LDFLAGS; \
-       CFLAGS="${CFLAGS:-%rpmcppflags %rpmcflags}"; export CFLAGS; \
-       CXXFLAGS="${CXXFLAGS:-%rpmcppflags %rpmcxxflags}"; export CXXFLAGS; \
-       %{?__cc:CC="%{__cc}"; export CC;} \
-       %{?__cxx:CXX="%{__cxx}"; export CXX;} \
-       %{__python3} setup.py \
-                               build --build-base=build-3 \
-                               install --skip-build \
-                               %{py3_install_opts} \
-                               --root=$RPM_BUILD_ROOT \
-}
 
 # node.js libdir
 # Requirements:
@@ -1298,44 +1253,6 @@ fi \
 # BuildRequires:       rpmbuild(macros) >= 1.719
 %zsh_compdir           /usr/share/zsh/site-functions
 
-# Hardlink binary identical .pyc and .pyo files
-%__spec_install_post_py_hardlink {\
-%{!?no_install_post_py_hardlink: __spec_install_post_py_hardlink() { \
-%{!?debug:set +x;} \
-local a b c=0 t=0 pyc=%{tmpdir}/%{name}-%{version}-%{release}__rpm_pyc; \
-if [ -d "$RPM_BUILD_ROOT" ]; then \
-       find "$RPM_BUILD_ROOT" -name '*.pyc' > $pyc; \
-       while read a; do \
-               b="${a%.pyc}.pyo"; \
-               if cmp -s "$a" "$b"; then \
-                       ln -f "$a" "$b"; \
-                       c=$((c + 1)); \
-               fi; \
-               t=$((t + 1)); \
-       done < $pyc; \
-       [ $t -gt 0 ] && printf "Hardlink Python files: %d/%d files hardlinked\n" $c $t; \
-       rm -f $pyc; \
-fi; \
-}; __spec_install_post_py_hardlink } }
-
-# Remove Python 2.x sources,
-# PLD Linux policy is to package only compiled .py[co] for Python 2.x libraries.
-# Author: Elan Ruusamäe <glen@pld-linux.org>
-#
-# Usage:
-# %py_postclean /usr/share/extra -x keepme.py,keeptoo.py
-# Options:
-# -x - comma separated of file basenames to preserve (rpmbuild(macros) >= 1.658)
-# ARGS - extra directories to clean for .py sources
-#
-# BuildRequires:       rpmbuild(macros) >= 1.189
-#
-%py_postclean(x:) \
-for d in %{py_sitescriptdir} %{py_sitedir} %*; do \
-       [ ! -d "$RPM_BUILD_ROOT$d" ] || find "$RPM_BUILD_ROOT$d" -name '*.py' -print0 %{-x:| grep -ZzvE '/(%(echo '%{-x*}' | tr ',' '|'))$'} | xargs -0r -l512 rm;\
-done \
-%{nil}
-
 # depmod macro
 %depmod() { \
 umask 022; \
@@ -1350,18 +1267,6 @@ else \
 fi; \
 }
 
-# XMMS specific macros
-%xmms_prefix                   %{expand:%%global xmms_prefix %(xmms-config --prefix 2>/dev/null || echo ERROR)}%xmms_prefix
-%xmms_exec_prefix              %{expand:%%global xmms_exec_prefix %(xmms-config --exec-prefix 2>/dev/null || echo ERROR)}%xmms_exec_prefix
-%xmms_version                  %{expand:%%global xmms_version %(xmms-config --version 2>/dev/null || echo ERROR)}%xmms_version
-%xmms_datadir                  %{expand:%%global xmms_datadir %(xmms-config --data-dir 2>/dev/null || echo ERROR)}%xmms_datadir
-%xmms_plugindir                        %{expand:%%global xmms_plugindir %(xmms-config --plugin-dir 2>/dev/null || echo ERROR)}%xmms_plugindir
-%xmms_visualization_plugindir  %{expand:%%global xmms_visualization_plugindir %(xmms-config --visualization-plugin-dir 2>/dev/null || echo ERROR)}%xmms_visualization_plugindir
-%xmms_input_plugindir          %{expand:%%global xmms_input_plugindir %(xmms-config --input-plugin-dir 2>/dev/null || echo ERROR)}%xmms_input_plugindir
-%xmms_output_plugindir         %{expand:%%global xmms_output_plugindir %(xmms-config --output-plugin-dir 2>/dev/null || echo ERROR)}%xmms_output_plugindir
-%xmms_effect_plugindir         %{expand:%%global xmms_effect_plugindir %(xmms-config --effect-plugin-dir 2>/dev/null || echo ERROR)}%xmms_effect_plugindir
-%xmms_general_plugindir                %{expand:%%global xmms_general_plugindir %(xmms-config --general-plugin-dir 2>/dev/null || echo ERROR)}%xmms_general_plugindir
-
 # user/group checking macros
 #
 # Usage:
@@ -1491,44 +1396,6 @@ else \
        [ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i group || : \
 fi;
 
-# webapp macros
-# Author: Elan Ruusamäe <glen@pld-linux.org>
-#
-# The config is installed/removed inside trigger, this means that you can any
-# time install apache1/apache/lighttpd package and the configuration file is
-# updated. if you don't need the config for various reason for specific
-# webserver, just remove the symlink from config directory using webapp
-# program. the trigger will not recreate the symlink on upgrades. In other
-# words the config is linked to webserver config directory on first install of
-# PACKAGE or WEBSERVER.
-#
-# Add package's webserver config to webserver webapps dir.
-# Usage:
-#   %webapp_register [-f] WEBSERVER WEBAPP
-#
-%webapp_register(f) \
-%{?debug:set -x; echo "webapp_register: %{name}-%{version}-%{release} 1:[$1]; 2:[$2]"} \
-if [ -n "%{-f:1}" ] || ([ "$1" = "1" ] && [ "$2" = "1" ]); then\
-       /usr/sbin/webapp register %1 %2\
-fi\
-# reload webserver if the config symlink is there and skip reload if webserver is upgraded\
-if [ -L /etc/%1/webapps.d/%(echo "%2" | tr '/' '-').conf ] && [ "$2" -lt "2" ]; then\
-       %{expand:%service -q %%1 reload}\
-fi\
-%{nil}
-
-# Remove package's config from webserver webapps dir.
-# Usage:
-#   %webapp_register [-f] WEBSERVER WEBAPP
-%webapp_unregister(f) \
-%{?debug:set -x; echo "webapp_unregister: %{name}-%{version}-%{release}: 1:[$1]; 2:[$2]"} \
-# remove link if either of the packages are gone \
-if [ -n "%{-f:1}" ] || ([ "$1" = "0" ] || [ "$2" = "0" ] && [ -L /etc/%1/webapps.d/%(echo "%2" | tr '/' '-').conf ]); then \
-       /usr/sbin/webapp unregister %1 %2\
-       %{expand:%service -q %%1 reload}\
-fi \
-%{nil}
-
 # service macro.
 # Author: Elan Ruusamäe <glen@pld-linux.org>
 #
@@ -1552,325 +1419,6 @@ fi \
 # BuildRequires:       rpmbuild(macros) >= 1.450
 %service(qn) {{%(export noop=%{-n:1} quiet=%{-q:1} RPM_BUILD_ROOT=%{buildroot}; /usr/lib/rpm/service_generator.sh %{*}) };}
 
-# Java macros. based on jpackage macros.java
-#
-# Root directory where all Java VMs/SDK/JREs are installed.
-%_jvmdir               %{_libdir}/jvm
-
-# Root directory where all Java VMs/SDK/JREs expose their jars
-%_jvmjardir            %{_libdir}/jvm-exports
-
-# Root directory for all Java VM/SDK/JRE's private things.
-%_jvmprivdir   %{_libdir}/jvm-private
-
-# Root directory for all architecture dependent parts of Java VM/SDK/JRE's
-%_jvmlibdir            %{_libdir}/jvm
-
-# Root directory for all architecture independent parts of Java VM/SDK/JRE's
-%_jvmdatadir   %{_datadir}/jvm
-
-# Root directory for all configurations parts of Java VM/SDK/JRE's
-%_jvmsysconfdir        %{_sysconfdir}/jvm
-
-# Root directory for all common architecture dependent parts of Java VM/SDK/JRE's
-%_jvmcommonlibdir      %{_libdir}/jvm-common
-
-# Root directory for all common architecture independent parts of Java VM/SDK/JRE's
-%_jvmcommondatadir     %{_datadir}/jvm-common
-
-# Root directory for all common configurations parts of Java VM/SDK/JRE's
-%_jvmcommonsysconfdir  %{_sysconfdir}/jvm-common
-
-# Directory where arch-specific (JNI) version-independent jars are installed.
-%_jnidir               %{_libdir}/java
-
-
-# JDK selection. Set this to name of the JDK implementation to use
-# insead of the system default
-#%use_jdk              icedtea6
-
-# expands to the value with right jdk for BuildRequires header
-# 'jdk' if %%use_jdk is not defined,  jdk(%%use_jdk) otherwise
-# The requirement will not replace current 'default' JDK
-%required_jdk  jdk%{?use_jdk:(%{use_jdk})}
-
-%buildrequires_jdk BuildRequires: %required_jdk
-
-%java_home             %{expand:%%global java_home %([ -f %{_javadir}-utils/java-functions ] || { echo ERROR; exit 0; }; %{!?use_jdk:unset JAVA_HOME; . %{_javadir}-utils/java-functions; set_jvm}%{?use_jdk:JAVA_HOME=%{_jvmdir}/%{use_jdk}}; echo ${JAVA_HOME:-ERROR})}%java_home
-
-%_javasrcdir   %{_usrsrc}/java
-
-%ant                   JAVA_HOME=%{java_home} CLASSPATH=$CLASSPATH ant
-%jar                   %{java_home}/bin/jar
-%java                  %{expand:%%global java %([ -f %{_javadir}-utils/java-functions ] || { echo ERROR; exit 0; }; %{!?use_jdk:unset JAVACMD; . %{_javadir}-utils/java-functions; set_javacmd}%{?use_jdk:JAVACMD=%{java_home}/bin/java}; echo $JAVACMD)}%java
-%javac                 %{java_home}/bin/javac
-%javadoc               %{java_home}/bin/javadoc
-
-%add_jvm_extension     JAVA_LIBDIR=%{buildroot}/%{_javadir}    %{_bindir}/jvmjar -l
-
-%jpackage_script() \
-install -d $RPM_BUILD_ROOT%{_bindir}\
-cat > $RPM_BUILD_ROOT%{_bindir}/%5 << 'EOF' \
-#!/bin/sh\
-#\
-# %{name} script\
-# JPackage Project <http://www.jpackage.org/>\
-\
-# Source functions library\
-. %{_javadir}-utils/java-functions\
-\
-# Source system prefs\
-if [ -f %{_sysconfdir}/java/%{name}.conf ]; then\
-      . %{_sysconfdir}/java/%{name}.conf\
-fi\
-\
-# Source user prefs\
-if [ -f $HOME/.%{name}rc ]; then\
-      . $HOME/.%{name}rc\
-fi\
-\
-# Configuration\
-MAIN_CLASS=%1\
-BASE_FLAGS=%2\
-BASE_OPTIONS=%3\
-BASE_JARS="%(echo %4 | tr ':' ' ')"\
-\
-# Set parameters\
-set_jvm\
-set_classpath $BASE_JARS\
-set_flags $BASE_FLAGS\
-set_options $BASE_OPTIONS\
-\
-# Let's start\
-run "$@"\
-EOF
-
-# jpackage 1.7
-# Directory for maven depmaps
-#
-%_mavendepmapdir /etc/maven
-%_mavendepmapfragdir /etc/maven/fragments
-
-#
-# add_to_depmap adds an entry to the depmap. The arguments are:
-#
-# %1 the original groupid
-# %2 the original artifact id
-# %3 the version
-# %4 the new groupid
-# %5 the new artifactid
-#
-
-%add_to_maven_depmap() \
-install -dm 755 $RPM_BUILD_ROOT/%{_mavendepmapfragdir}\
-cat >>$RPM_BUILD_ROOT/%{_mavendepmapfragdir}/%{name}<< EOF\
-<dependency>\
-    <maven>\
-        <groupId>%1</groupId>\
-        <artifactId>%2</artifactId>\
-        <version>%3</version>\
-    </maven>\
-    <jpp>\
-        <groupId>%4</groupId>\
-        <artifactId>%5</artifactId>\
-        <version>%3</version>\
-    </jpp>\
-</dependency>\
-\
-EOF\
-%{nil}
-
-#==============================================================================
-#
-# update_maven_depmap updates the main maven depmap
-#
-%update_maven_depmap() \
-echo -e "<dependencies>\\n" > %{_mavendepmapdir}/maven2-depmap.xml\
-if [ -d %{_mavendepmapfragdir} ] && [ -n "`find %{_mavendepmapfragdir} -type f`" ]; then\
-cat %{_mavendepmapfragdir}/* >> %{_mavendepmapdir}/maven2-depmap.xml\
-fi\
-echo -e "</dependencies>\\n" >> %{_mavendepmapdir}/maven2-depmap.xml
-
-# JAVA macros specific for PLD
-
-# Directory for tomcat context configuration files
-%_tomcatconfdir        /etc/tomcat/Catalina/localhost
-
-# Tomcat cache path
-%_tomcatcachedir %{_sharedstatedir}/tomcat/work/Catalina/localhost
-
-# Clear tomcat cache
-# Author: Paweł Zuzelski <pawelz@pld-linux.org>
-#
-# Usage:
-# %%tomcat_clear_cache appname
-#
-# Call this script in %postun scriptlet. It will remove compiled jsps related to
-# given app.
-#
-%tomcat_clear_cache() %{!?1:ERROR}%{?2:ERROR} %{__rm} -rf %{_tomcatcachedir}/%1
-
-# PEAR install macros
-# Author: Elan Ruusamäe <glen@pld-linux.org>
-#
-# Usage:
-#      %%pear_package_setup ...
-#
-# -a #   - also unpack SOURCE#. for PEAR bootstrapping
-# -n FMT - create builddir with FMT, instead of default %%{pearname}-%%{version}
-# -z     - unpack pear package and let pear use package.xml (not tarball) for install. for PEAR bootstrapping
-# -D     - pass -D to %setup (so the build dir is not removed)
-# -c     - register channel from local channel.xml file
-# -d     - pass -d arg to pearcmd
-#
-# unpack PEAR package to %%{_builddir}/FMT. package is extracted with already
-# destination hierarchy. you should copy the tree to buildroot after
-# patching/reorganizing with %%pear_package_install.
-#
-# additionally BUILDROOT is stripped from files and files are converted to UNIX
-# line endings.
-#
-# the pear install process output is recorded to install.log, you should put it
-# to %%doc for later debug or just for information.
-#
-# additionally additional-packages.txt is produced if it was detected that the
-# package has optional dependencies. the file format is suitable of displaying
-# in %%post of a package. you should put this file to %%doc. noautocompressdoc is
-# automatically added for this file.
-
-
-# records install.log and transforms PEAR names to PLD Linux rpm package names.
-%__pear_install_log \
-tee install.log \
-# make post message of optional packages \
-grep -E 'can optionally use|Optional feature' install.log | sed -e 's,package "pear/,package "php-pear-,g;s,^pear/,php-pear-,;s,^pear/,php-pear-,' > optional-packages.txt \
-if [ -s optional-packages.txt ]; then \
-       awk -F'"' '/use package/{print $2}' optional-packages.txt | sed -e "s,_,/,g;s,php-pear-, 'pear(,;s,$,.*)'," | tr -d '\\\n' > _noautoreq \
-else \
-       rm -f optional-packages.txt \
-fi \
-%{nil}
-
-# Command invoking PEAR CLI
-# Same as /usr/bin/pear, except we force GMT timezone
-%__pear        %__php -doutput_buffering=1 -dopen_basedir="" -dmemory_limit=-1 -ddate.timezone=GMT /usr/share/pear/pearcmd.php
-
-%pear_install(a:d:n:zD) \
-%__pear \\\
-       -c %{builddir}/pearrc \\\
-       -d doc_dir=/docs \\\
-       -d temp_dir=/tmp \\\
-       -d php_dir=%{-c:%{builddir}/}%{php_pear_dir} \\\
-       -d bin_dir=%{_bindir} \\\
-       -d data_dir=%{php_pear_dir}/data \\\
-       -d test_dir=%{php_pear_dir}/tests \\\
-       %{-d:%(echo "%{-d*}" | awk 'BEGIN{RS=","}{printf("-d %%s \\\\\\n\\t", $1)}')} \\\
-       install \\\
-       --packagingroot=%{builddir} \\\
-       --offline \\\
-       --nodeps \\\
-       %{-f:--force} \\\
-       %{!-z:%{S:%{-a*}%{!-a:0}}}%{-z:$_P} > .install.log || { c=$?; cat .install.log; exit $c; }; \
-       %{-c:cp -a %{builddir}/%{builddir}/%{php_pear_dir} %{builddir}/%(dirname %{php_pear_dir}); rm -rf %{builddir}/%{builddir}; } \
-%{nil}
-
-# The main macro.
-# using this macro will append optional-packages.txt to the nocompressdoc list
-# as it's displayed to user after package install. and adding additional gzip
-# dep is just waste ;)
-%pear_package_setup(a:d:n:zDc:) \
-%define srcdir %{-n*}%{!-n:%{?_pearname}%{!?_pearname:%{pearname}}-%{version}} \
-%define builddir %{_builddir}/%{srcdir} \
-%setup -q -c -T %{-D:-D} -n %{srcdir} \
-%{-z:%{__tar} zxf %{S:0}; %{-a:%{__tar} zxf %{S:%{-a*}}}} \
-%{-z:_P=package2.xml; [ -f $_P ] || _P=package.xml; _N=%{srcdir}; mv $_P $_N; cd $_N} \
-%{-c:%{__pear} -c pearrc config-set php_dir %{builddir}/%{php_pear_dir}; %__pear -c %{builddir}/pearrc channel-add %{-c*}} \
-%pear_install \
-%{-z:cd ..} \
-%{__tar} --wildcards -zvxf %{S:0} package*.xml \
-cat %{-z:$_N/}.install.log | %__pear_install_log \
-%undos -f php,html,js,xml \
-%{!?_noautocompressdoc:%global _noautocompressdoc %{nil}}%{expand:%%global _noautocompressdoc %{_noautocompressdoc} optional-packages.txt} \
-%{!?_noautoprov:%global _noautoprov %{nil}}%{expand:%%global _noautoprov %{_noautoprov} 'pear(tests/.*)'} \
-%{nil}
-
-# Copies extracted PEAR package structure and PEAR registry to buildroot.
-# Author: Elan Ruusamäe <glen@pld-linux.org>
-%pear_package_install() \
-cp -a ./%{php_pear_dir}/{.registry,*} $RPM_BUILD_ROOT%{php_pear_dir} \
-# tests should not be packaged \
-%{__rm} -rf $RPM_BUILD_ROOT%{php_pear_dir}/tests \
-# cleanup backups \
-find $RPM_BUILD_ROOT%{php_pear_dir} '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v \
-# help the developer out a little: \
-if [ -f _noautoreq ]; then \
-       echo "AutoReqdep detected:" \
-       echo "_noautoreq $(cat _noautoreq)" \
-fi \
-%{nil}
-
-# Print optional package info for pear packages
-# Author: Elan Ruusamäe <glen@pld-linux.org>
-# Usage:
-#   %post -p <lua>
-#      %%pear_package_print_optionalpackages
-#
-# Requirements:
-# BuildRequires:       rpmbuild(macros) >= 1.571
-%pear_package_print_optionalpackages \
-f = io.open("%{_docdir}/%{name}-%{version}/optional-packages.txt", "r") \
-if f then \
-       for l in f:lines() do print(l); end \
-       f:close() \
-end \
-%{nil}
-
-
-# Register OpenLDAP schema.
-# Author: Elan Ruusamäe <glen@pld-linux.org>
-#
-# Usage:
-#   %%openldap_schema_register [-d core,nis] %{schemadir}/horde.schema
-#
-#  -d specify dependant schemas, separated by comma
-#
-%openldap_schema_register(d:) \
-for schema in %*; do \
-       if ! grep -q "$schema" /etc/openldap/slapd.conf; then \
-               %{__sed} -i -e " \
-                       /^include.*local.schema/{ \
-                               iinclude\\t     $schema\
-                       } \
-               " /etc/openldap/slapd.conf \
-       fi \
-done \
-# enable dependant schemas \
-if [ "%{-d*}" ]; then \
-       %{__sed} -i -e ' \
-       /^#include.*\\(%(echo '%{-d*}' | %{__sed} -e 's/,/\\\\|/g')\\)\\.schema/{ \
-               s/^#// \
-       }' /etc/openldap/slapd.conf \
-fi \
-%{nil}
-
-# Unregister OpenLDAP schema.
-# Author: Elan Ruusamäe <glen@pld-linux.org>
-#
-# Usage:
-#   %%openldap_schema_unregister %{schemadir}/horde.schema
-#
-%openldap_schema_unregister() \
-for schema in %*; do \
-       if grep -q "$schema" /etc/openldap/slapd.conf; then \
-               %{__sed} -i -e " \
-               /^include.*$(echo "$schema" | %{__sed} -e 's,/,\\\\/,g')/d \
-               # for symmetry it would be nice if we disable enabled schemas in post, \
-               # but we really can not do that, it would break something else. \
-               " /etc/openldap/slapd.conf \
-       fi \
-done \
-%{nil}
-
 %env_update [ ! -x /sbin/env-update ] || /sbin/env-update -u || :
 
 # patchset macros
@@ -1915,10 +1463,10 @@ done \
        start=$(expr $base + %1);
        end=$(expr $base + %{?2}%{!?2:%{1}});
        # we need to call seq twice as it doesn't allow two formats
-       seq -f 'Patch%g:' $start $end > %{tmpdir}/__ps1;
-       seq -f '%{-f*}' %1 %{?2}%{!?2:%{1}} > %{tmpdir}/__ps2;
-       paste %{tmpdir}/__ps{1,2};
-       rm -f %{tmpdir}/__ps{1,2};
+       seq -f 'Patch%g:' $start $end > %{_tmppath}/__ps1;
+       seq -f '%{-f*}' %1 %{?2}%{!?2:%{1}} > %{_tmppath}/__ps2;
+       paste %{_tmppath}/__ps{1,2};
+       rm -f %{_tmppath}/__ps{1,2};
 }
 ) \
 %{nil}
@@ -1950,33 +1498,6 @@ done \
 # return EXPANDED source url N from current spec
 %sourceurl(n:) %(test "$IN_RPM" = 1 && exit 1; export IN_RPM=1; rpmbuild --nodigest --nosignature --nobuild -D "prep %%dump" %{_specdir}/%{name}.spec 2>&1 | awk '$2 ~ /^SOURCEURL%{-n*}/ {print $3}')
 
-# browser plugins v2
-# Author: Elan Ruusamäe <glen@pld-linux.org>
-#
-# Usage:
-#      %browser_plugins_add_browser <name> -p <plugindir>
-#
-#  <name> (required) -- name of the browser. usually %{name}.
-#  -p <plugindir> (required) -- in what directory browser searches for its plugins.
-#  -b -- default blacklists
-#  -a <arch> override arch
-#
-# Example:
-#   %browser_plugins_add_browser %{name} -p %{_firefoxdir}/plugins
-
-%_browserpluginsconfdir                /etc/browser-plugins
-%_browserpluginsdir                    %{_libdir}/browser-plugins
-%update_browser_plugins                /usr/sbin/update-browser-plugins || :
-
-%browser_plugins_add_browser(p:b:a:) \
-       browser=%1.%{!-a:%{_target_base_arch}}%{-a*} \
-       install -d $RPM_BUILD_ROOT%{_browserpluginsconfdir}/{blacklist,browsers}.d \
-       ln -s %{-p*} $RPM_BUILD_ROOT%{_browserpluginsconfdir}/browsers.d/$browser \
-       blacklist_file=$RPM_BUILD_ROOT%{_browserpluginsconfdir}/blacklist.d/$browser.blacklist \
-       echo '# This file format is shell globs at base dir of plugindir' > $blacklist_file \
-       %{-b:cat >> $blacklist_file %{-b*}} \
-%{nil}
-
 # Helper for LUA.
 # split string separated by space into quoted list
 #
@@ -2065,49 +1586,6 @@ end\
 %{-p:end} \
 %{nil}
 
-# Check syntax for Python files
-#
-# Author: Elan Ruusamäe <glen@pld-linux.org>
-# Author: Arkadiusz Miśkiewicz <arekm@pld-linux.org>
-#
-# Usage:
-#   %py_lint src
-#
-# Requirements:
-# BuildRequires:       python
-# BuildRequires:       rpmbuild(macros) >= 1.602
-
-%py_lint() \
-__py_lint() { \
-%{!?debug:set +x;} \
-find "$@" -type f -name '*.py' | python -c ' \
-import sys \
-import compiler \
-\
-found = err = 0\
-for f in sys.stdin: \
-       fd = open(f.rstrip()) \
-       c = fd.read() \
-       fd.close() \
-       found = found + 1 \
-       try: \
-               compiler.parse(c) \
-       except SyntaxError, e: \
-               print "py_lint: %s: %s" % (f.rstrip(), e) \
-               err = err + 1\
-\
-if not found:\
-       print >> sys.stderr, "\\npy_lint: ERROR: No files processed.\\n" \
-       sys.exit(1) \
-elif err: \
-       print >> sys.stderr, "\\npy_lint: ERROR: Syntax errors in %d files.\\n" % err \
-       sys.exit(1) \
-else: \
-       print >> sys.stderr,  "py_lint: %d files scanned, found no syntax errors." % found \
-' \
-}; __py_lint %* \
-%{nil}
-
 # Undos files
 #
 # Author: Paweł Zuzelski <pawelz@pld-linux.org>
@@ -2138,245 +1616,6 @@ else: \
 %undos(f:i)    %{-f:%{__find} -type f -regextype posix-extended -%{-i:i}regex '^.+\\.(%(echo %{-f*} | tr ',' '|'))$' -print0 | xargs -0} %{__sed} -i -e 's,\\r$,,' %* \
 %{nil}
 
-# Hook to register nagios object based plugins in Nagios NRPE daemon config.
-#
-# Author: Elan Ruusamäe <glen@pld-linux.org>
-#
-# Usage:
-#  -a NAME  -- add command named NAME
-#  -d NAME  -- remove command named NAME
-#  -f FILE  -- specify plugin configuration FILE to extract command definition from
-#
-# Sample:
-# %triggerin -- nagios-nrpe
-# %nagios_nrpe -a %{plugin} -f %{_sysconfdir}/%{plugin}.cfg
-#
-# %triggerun -- nagios-nrpe
-# %nagios_nrpe -d %{plugin} -f %{_sysconfdir}/%{plugin}.cfg
-#
-# Requirements:
-# Requires:                    grep
-# Requires:                    sed >= 4.0
-# BuildRequires:       rpmbuild(macros) >= 1.685
-%nagios_nrpe(a:d:c:f:) {\
-       if %{__grep} -q '^include_dir=/etc/nagios/nrpe.d' /etc/nagios/nrpe.cfg && [ -d /etc/nagios/nrpe.d ]; then \
-               file=/etc/nagios/nrpe.d/%{-a*}%{-d*}.cfg; \
-       else \
-               file=/etc/nagios/nrpe.cfg; \
-       fi; \
-       m=$(test -f $file && md5sum < $file); \
-       %{-a:# on -a and config exists \
-       if [ -f /etc/nagios/nrpe.cfg ]; then \
-               if [ ! -f $file ] || ! %{__grep} -q '^command\[%{-a*}\]' $file; then \
-                       %{__sed} -ne 's/^[ \t]*command_line[ \t]\+\(.\+\)/command[%{-a*}]=\1/p' %{-f*} >> $file; \
-               fi; \
-       fi;} \
-       %{-d:# on package remove, -d and config exists \
-       if [ "$1" = "0" -a -f $file ]; then \
-               %{__sed} -i -e '/^[ \t]*command\[%{-d*}\]/d' $file; \
-       fi;} \
-       if [ "$m" != "$(md5sum < $file)" ]; then \
-               %service -q nrpe restart; \
-       fi; \
-}%{nil}
-
-# Import or update Cacti template.
-#
-# Author: Elan Ruusamäe <glen@pld-linux.org>
-#
-# Usage:
-# %cacti_import_template XMLFILE
-#  XMLFILE -- XML template to import
-#
-# Sample:
-# %post
-# %cacti_import_template %{resourcedir}/cacti_host_template_varnish.xml
-#
-# Requires:    cacti >= 0.8.7e-8
-# BuildRequires:       rpmbuild(macros) >= 1.630
-# Note: 1.1 (cacti-0.8.7h) adds requirement for --with-template-rras or --with-user-rras option
-
-%cacti_import_template() {\
-v=$(%{__sed} -rne 's/.+Add Graphs Script ([0-9\.]+).+/\1/p' /usr/share/cacti/cli/import_template.php); \
-if [ "$v" != "1.0" ]; then \
-       rra="--with-template-rras"; \
-fi; \
-/usr/share/cacti/cli/import_template.php --filename=%1 $rra || :; \
-}%{nil}
-
-# pre/post script for -upstart subpackages
-#
-# Author: Jacek Konieczny <jajcus@jajcus.net>
-# Author: Elan Ruusamäe <glen@pld-linux.org>
-#
-# Usage:
-#      %upstart_post service_name
-#   %upstart_postun service_name
-#
-# Sample:
-# %post upstart
-# %upstart_post %{name}
-#
-# %postun upstart
-# %upstart_postun %{name}
-#
-# Requirements:
-# BuildRequires:       rpmbuild(macros) >= 1.690
-# Requires:                    rc-scripts >= 0.4.3
-
-# migrate from init script to upstart job
-%upstart_post() \
-       if [ -x /sbin/initctl ] && [ -f /var/lock/subsys/%1 ]; then \
-               /sbin/service --no-upstart %1 stop \
-               /sbin/service %1 start \
-       fi \
-%{nil}
-
-# restart the job after upgrade or migrate to init script on removal
-# cannot be stopped with 'service' as /etc/init/$name.conf may be missing
-# at this point
-%upstart_postun() \
-       if [ -x /sbin/initctl ] && /sbin/initctl status %1 2>/dev/null | grep -q 'running' ; then \
-               /sbin/initctl stop %1 >/dev/null 2>&1 \
-               [ -f /etc/rc.d/init.d/%1 -o -f /etc/init/%1.conf ] && { echo -n "Re-"; /sbin/service %1 start; }; \
-       fi \
-%{nil}
-
-# Haskell Macros
-# BuildRequires:       rpmbuild(macros) >= 1.608
-%ghcdir                ghc-%(/usr/bin/ghc --numeric-version 2>/dev/null || echo ERROR)
-
-# update /usr/lib*/ghc-*/package.conf.d/package.cache
-# Requires: ghc
-# BuildRequires:       rpmbuild(macros) >= 1.607
-#
-%ghc_pkg_recache() {{ \
-       umask 022; \
-       [ ! -x /usr/bin/ghc-pkg ] || /usr/bin/ghc-pkg recache; \
-};} \
-%{nil}
-
-
-# pre/post script for packages supporting systemd units
-#
-# Authors:     Bartlomiej Zimon <uzi18@o2.pl>
-#              Jan Rękorajski <baggins@mimuw.edu.pl>
-#
-# Usage:
-# %systemd_reload
-# %systemd_service <unit command> service_name1.service service_name2.service
-# %systemd_service_enable service_name1.service service_name2.service
-# %systemd_service_disable service_name1.service service_name2.service
-# %systemd_service_start service_name1.service service_name2.service
-# %systemd_service_stop service_name1.service service_name2.service
-# %systemd_service_restart service_name1.service service_name2.service
-# %systemd_service_reload service_name1.service service_name2.service
-#
-# %systemd_post service_name1.service service_name2.service
-# %systemd_preun service_name1.service service_name2.service
-# %systemd_trigger service_name1.service service_name2.service
-#
-# Sample:
-# %post
-# %systemd_post %{name}.service
-#
-# %preun
-# %systemd_preun %{name}.service
-#
-# %postun
-# %systemd_reload
-#
-# %triggerpostun -- %{name} < first-version-with-systemd-units
-# %systemd_trigger %{name}.service
-#
-# Requirements:
-# BuildRequires:       rpmbuild(macros) >= 1.671
-# Requires:    systemd-units >= 38
-
-%systemd_reload /bin/systemd_booted && SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog /bin/systemctl daemon-reload || :
-
-%systemd_service_enable() \
-       export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
-       /bin/systemctl preset --preset-mode=enable-only %{*} || : \
-       /bin/systemd_booted && echo 'Run "/bin/systemctl start %{*}" to start %{*}.' || : \
-%{nil}
-
-%systemd_service_disable() \
-       export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
-       /bin/systemctl --quiet disable %{*} || : \
-%{nil}
-
-%systemd_service() \
-       export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
-       /bin/systemd_booted && /bin/systemctl %{*} || : \
-%{nil}
-
-%systemd_service_start() \
-       export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
-       /bin/systemd_booted && /bin/systemctl start %{*} || : \
-%{nil}
-
-%systemd_service_stop() \
-       export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
-       /bin/systemd_booted && /bin/systemctl stop %{*} || : \
-%{nil}
-
-# NOTE: doesn't honour RPM_SKIP_AUTO_RESTART, avoid using
-%systemd_service_restart() \
-       export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
-       /bin/systemd_booted && /bin/systemctl try-restart %{*} || : \
-%{nil}
-
-# NOTE: doesn't honour RPM_SKIP_AUTO_RESTART, avoid using
-%systemd_service_reload() \
-       export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
-       /bin/systemd_booted && /bin/systemctl reload %{*} || : \
-%{nil}
-
-# NOTE: this trigger disobeys systemd.preset in favour of RPM_ENABLE_SYSTEMD_SERVICE
-%systemd_trigger() \
-want_enable_service() { \
-       [ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm \
-       [ ${RPM_ENABLE_SYSTEMD_SERVICE:-yes} = no ] && return 1 \
-       [ "$(echo /etc/rc.d/rc[0-6].d/S[0-9][0-9]${1%.service})" = "/etc/rc.d/rc[0-6].d/S[0-9][0-9]${1%.service}" ] && return 1 \
-       return 0 \
-}\
-       export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
-       for s in %{*}; do \
-               if want_enable_service $s; then \
-                       /bin/systemctl enable $s || : \
-               fi \
-       done \
-%{nil}
-
-%systemd_post() \
-       export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
-       /bin/systemd_booted && /bin/systemctl daemon-reload || : \
-       if [ $1 -eq 1 ]; then \
-               /bin/systemctl preset --preset-mode=enable-only %{*} >/dev/null || : \
-               /bin/systemd_booted && echo 'Run "/bin/systemctl start %{*}" to start %{*}.' || : \
-       elif [ -z "$NORESTART" ]; then \
-               /bin/systemd_booted && /bin/systemctl try-restart %{*} || : \
-       else \
-               /bin/systemd_booted && echo 'Run "/bin/systemctl restart %{*}" to restart %{*}.' || : \
-       fi \
-%{nil}
-
-%systemd_preun() \
-       if [ $1 -eq 0 ]; then \
-               export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
-               /bin/systemd_booted && /bin/systemctl stop %{*} || : \
-               /bin/systemctl --quiet disable %{*} || : \
-       fi \
-%{nil}
-
-%systemdunitdir /lib/systemd/system
-%systemduserunitdir /usr/lib/systemd/user
-%systemdtmpfilesdir /usr/lib/tmpfiles.d
-
-# BuildRequires:       rpmbuild(macros) >= 1.721
-%journal_catalog_update() [ ! -x /bin/journalctl ] || /bin/journalctl --update-catalog >/dev/null 2>&1 || :
-
 #-----------------------------------------------------------------
 # Update hardware database index
 #
@@ -2398,5 +1637,3 @@ want_enable_service() { \
 umask 022; \
 /usr/bin/vim -c ':helptags /usr/share/vim/doc' -c ':q' 2>/dev/null \
 %{nil}
-
-# EOF
This page took 0.085405 seconds and 4 git commands to generate.