
# Included from file macros.intro/macros.intro
# Introduced for ALT Linux macros.
# Collected by Vitaly Lipatov <lav@etersoft.ru>
# I guess these macros are not defined in Sisyphus in the package build time
# These macros will be packed in rpm-build-intro package

# NOTE!
# Don't forget copy the same to macros.intro.backport

# for discussion:
%make_install_std %makeinstall_std

# If macros is component related (like kde, java, perl), use name like %name_somedir
# If macros for some dir, use name like %_omfdir

%kde_docdir %_docdir/HTML
%gtk_docdir %_datadir/gtk-doc/html
%java_dir %_datadir/java
%java_docdir %_datadir/javadoc

%_kdedocdir %_docdir/HTML
%_gtkdocdir %_datadir/gtk-doc/html
%_javadir %_datadir/java
%_javadocdir %_datadir/javadoc

# various for prev. distro...
# FIXME: on other platforms only
%rpmcflags %optflags
# due error on SUSE
#%rpmldflags %nil
%rpmcxxflags %optflags

# Normalize source file permissions
%fix_permissions \
find ./ -type d -print0 | xargs -0 chmod 0775 \
find ./ -type f -print0 | xargs -0 chmod 0664

# Remove unneeded repository info (since rpm-build-compat 1.5)
%remove_repo_info \
find ./ -type d -name .svn -print0 | xargs -0 --no-run-if-empty rm -rf {} \; \
find ./ -type d -name CVS -print0 | xargs -0 --no-run-if-empty rm -rf {} \;

# macro for init scripts configs (/etc/default in Debian/Ubuntu)
%_sysconfigdir %_sysconfdir/sysconfig

# 32bit libs placement dir (inside 64bit package too)
%_lib32dir %_prefix/lib

# path to /etc/sudoers extension dir
%_sudoersdir %_sysconfdir/sudoers.d

# cups lib dir
%_cupslibdir %_prefix/lib/cups

# todo for rpm-macros-qt4 (altbug #28724)
%qmake_qt4 \
  CPPFLAGS="${CPPFLAGS:-%optflags}" ; export CPPFLAGS ; \
  %_qt4dir/bin/qmake \\\
  QMAKE_CFLAGS="${CFLAGS:-%optflags}" \\\
  QMAKE_CXXFLAGS="${CXXFLAGS:-%optflags}" \\\
  QMAKE_LFLAGS="%{?ldflags}"

# Included from file macros.distro/macros.alt
# Platform and version dependend macros (ALT Linux only)
# These macros introduced for ALT and packed for ALT Linux only
# These macros will packed in rpm-build-intro package on ALT

# Start service only after manual install
# this case is never run due no tty under rpm process install
# 1 - 1st install, 2 - update package
%start_service() \
        false && [ -z "$DURING_INSTALL" ] && [ "$1" = "1" ] && %_initddir/%{1} start || : \
%nil

# PLD compatibility
%groupadd /usr/sbin/groupadd -r -f
%useradd /usr/sbin/useradd -r
#%userremove userdel
#%groupremove groupdel

