enhanced build files for rpm packaging
This commit is contained in:
parent
e2af46cabe
commit
824632d4cb
@ -14,3 +14,16 @@ DIST_SUBDIRS = $(SUBDIRS) t
|
|||||||
|
|
||||||
distclean-local:
|
distclean-local:
|
||||||
@rm -rf $(top_srcdir)/autom4te.cache
|
@rm -rf $(top_srcdir)/autom4te.cache
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
TARGET ?= @build_cpu@
|
||||||
|
|
||||||
|
rpm: dist-gzip
|
||||||
|
mkdir -p "@abs_builddir@/pkgs/RPM/BUILD"
|
||||||
|
mkdir -p "@abs_builddir@/pkgs/RPM/SOURCES"
|
||||||
|
mkdir -p "@abs_builddir@/pkgs/RPM/SRPMS"
|
||||||
|
mkdir -p "@abs_builddir@/pkgs/RPM/RPMS"
|
||||||
|
cp @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz "@abs_builddir@/pkgs/RPM/SOURCES"
|
||||||
|
rpmbuild --define "_topdir @abs_builddir@/pkgs/RPM" -ba @abs_builddir@/pkgs/hawk.spec --target=$(TARGET)
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
|||||||
configure.lineno config.status.lineno
|
configure.lineno config.status.lineno
|
||||||
mkinstalldirs = $(install_sh) -d
|
mkinstalldirs = $(install_sh) -d
|
||||||
CONFIG_HEADER = $(top_builddir)/lib/hawk-cfg.h
|
CONFIG_HEADER = $(top_builddir)/lib/hawk-cfg.h
|
||||||
CONFIG_CLEAN_FILES =
|
CONFIG_CLEAN_FILES = pkgs/hawk.spec
|
||||||
CONFIG_CLEAN_VPATH_FILES =
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
AM_V_P = $(am__v_P_@AM_V@)
|
AM_V_P = $(am__v_P_@AM_V@)
|
||||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||||
@ -167,9 +167,10 @@ CSCOPE = cscope
|
|||||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/ac/ar-lib \
|
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/ac/ar-lib \
|
||||||
$(top_srcdir)/ac/compile $(top_srcdir)/ac/config.guess \
|
$(top_srcdir)/ac/compile $(top_srcdir)/ac/config.guess \
|
||||||
$(top_srcdir)/ac/config.sub $(top_srcdir)/ac/install-sh \
|
$(top_srcdir)/ac/config.sub $(top_srcdir)/ac/install-sh \
|
||||||
$(top_srcdir)/ac/ltmain.sh $(top_srcdir)/ac/missing ac/ar-lib \
|
$(top_srcdir)/ac/ltmain.sh $(top_srcdir)/ac/missing \
|
||||||
ac/compile ac/config.guess ac/config.sub ac/depcomp \
|
$(top_srcdir)/pkgs/hawk.spec.in ac/ar-lib ac/compile \
|
||||||
ac/install-sh ac/ltmain.sh ac/missing
|
ac/config.guess ac/config.sub ac/depcomp ac/install-sh \
|
||||||
|
ac/ltmain.sh ac/missing
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
distdir = $(PACKAGE)-$(VERSION)
|
distdir = $(PACKAGE)-$(VERSION)
|
||||||
top_distdir = $(distdir)
|
top_distdir = $(distdir)
|
||||||
@ -411,6 +412,8 @@ $(top_srcdir)/configure: $(am__configure_deps)
|
|||||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||||
$(am__aclocal_m4_deps):
|
$(am__aclocal_m4_deps):
|
||||||
|
pkgs/hawk.spec: $(top_builddir)/config.status $(top_srcdir)/pkgs/hawk.spec.in
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||||
|
|
||||||
mostlyclean-libtool:
|
mostlyclean-libtool:
|
||||||
-rm -f *.lo
|
-rm -f *.lo
|
||||||
@ -848,6 +851,18 @@ uninstall-am:
|
|||||||
distclean-local:
|
distclean-local:
|
||||||
@rm -rf $(top_srcdir)/autom4te.cache
|
@rm -rf $(top_srcdir)/autom4te.cache
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
TARGET ?= @build_cpu@
|
||||||
|
|
||||||
|
rpm: dist-gzip
|
||||||
|
mkdir -p "@abs_builddir@/pkgs/RPM/BUILD"
|
||||||
|
mkdir -p "@abs_builddir@/pkgs/RPM/SOURCES"
|
||||||
|
mkdir -p "@abs_builddir@/pkgs/RPM/SRPMS"
|
||||||
|
mkdir -p "@abs_builddir@/pkgs/RPM/RPMS"
|
||||||
|
cp @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz "@abs_builddir@/pkgs/RPM/SOURCES"
|
||||||
|
rpmbuild --define "_topdir @abs_builddir@/pkgs/RPM" -ba @abs_builddir@/pkgs/hawk.spec --target=$(TARGET)
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
.NOEXPORT:
|
.NOEXPORT:
|
||||||
|
3
hawk/configure
vendored
3
hawk/configure
vendored
@ -23343,7 +23343,7 @@ HAWK_PROJECT_AUTHOR="${PACKAGE_BUGREPORT}"
|
|||||||
HAWK_PROJECT_URL="${PACKAGE_URL}"
|
HAWK_PROJECT_URL="${PACKAGE_URL}"
|
||||||
|
|
||||||
|
|
||||||
ac_config_files="$ac_config_files Makefile tools/Makefile lib/Makefile mod/Makefile bin/Makefile samples/Makefile t/Makefile"
|
ac_config_files="$ac_config_files Makefile tools/Makefile lib/Makefile mod/Makefile bin/Makefile samples/Makefile t/Makefile pkgs/hawk.spec"
|
||||||
|
|
||||||
cat >confcache <<\_ACEOF
|
cat >confcache <<\_ACEOF
|
||||||
# This file is a shell script that caches the results of configure
|
# This file is a shell script that caches the results of configure
|
||||||
@ -24515,6 +24515,7 @@ do
|
|||||||
"bin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;;
|
"bin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;;
|
||||||
"samples/Makefile") CONFIG_FILES="$CONFIG_FILES samples/Makefile" ;;
|
"samples/Makefile") CONFIG_FILES="$CONFIG_FILES samples/Makefile" ;;
|
||||||
"t/Makefile") CONFIG_FILES="$CONFIG_FILES t/Makefile" ;;
|
"t/Makefile") CONFIG_FILES="$CONFIG_FILES t/Makefile" ;;
|
||||||
|
"pkgs/hawk.spec") CONFIG_FILES="$CONFIG_FILES pkgs/hawk.spec" ;;
|
||||||
|
|
||||||
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
|
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
|
||||||
esac
|
esac
|
||||||
|
@ -1022,6 +1022,7 @@ AC_CONFIG_FILES([
|
|||||||
bin/Makefile
|
bin/Makefile
|
||||||
samples/Makefile
|
samples/Makefile
|
||||||
t/Makefile
|
t/Makefile
|
||||||
|
pkgs/hawk.spec
|
||||||
])
|
])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
||||||
|
58
hawk/pkgs/hawk.spec.in
Normal file
58
hawk/pkgs/hawk.spec.in
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
%define _prefix /usr
|
||||||
|
%define _sysconfdir /etc
|
||||||
|
|
||||||
|
Summary: HAWK Interpreter
|
||||||
|
Name: @PACKAGE_NAME@
|
||||||
|
Version: @PACKAGE_VERSION@
|
||||||
|
Release: 1%{?dist}
|
||||||
|
License: Simplified BSD License
|
||||||
|
Vendor: Chung, Hyung-Hwan
|
||||||
|
URL: @PACKAGE_URL@
|
||||||
|
Group: System Environment/Libraries
|
||||||
|
Source0: %{name}-%{version}.tar.gz
|
||||||
|
#Requires:
|
||||||
|
|
||||||
|
BuildRequires: mysql-devel
|
||||||
|
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||||
|
|
||||||
|
%description
|
||||||
|
HAWK Interpreter
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Development files for HAWK
|
||||||
|
Group: System Environment/Libraries
|
||||||
|
Requires: @PACKAGE_NAME@ = %{version}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
The header files and libraries for developing applications with HAWK.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
|
||||||
|
%build
|
||||||
|
RPM_OPT_FLAGS="$(echo $RPM_OPT_FLAGS | %{__sed} 's/-O2/-O3/')"
|
||||||
|
CFLAGS="${RPM_OPT_FLAGS}" CXXFLAGS="${RPM_OPT_FLAGS} -std=c++11" ./configure --prefix=%{_prefix} --libdir=%{_libdir} --sysconfdir=%{_sysconfdir} --enable-shared=no --enable-static-module=yes --enable-unicode="yes:2w" --enable-cxx=yes --enable-mod=mysql=yes --enable-mod-uci=no ##CC=gcc44 CXX=g++44
|
||||||
|
make
|
||||||
|
|
||||||
|
%install
|
||||||
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf "$RPM_BUILD_ROOT"
|
||||||
|
|
||||||
|
%post
|
||||||
|
/sbin/ldconfig
|
||||||
|
|
||||||
|
%postun
|
||||||
|
/sbin/ldconfig
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_bindir}/*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_includedir}/*
|
||||||
|
%{_libdir}/*.a
|
Loading…
Reference in New Issue
Block a user