Skip to content

Commit

Permalink
add rpm support in Makefile.am
Browse files Browse the repository at this point in the history
  • Loading branch information
yhfudev committed Jan 18, 2015
1 parent 459784a commit 33b534a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
17 changes: 17 additions & 0 deletions rpm/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
AUTOMAKE_OPTIONS = foreign

EXTRA_DIST=libucd.spec

# define rpm build root
RPMBUILDTOPDIR = $(shell unset RPMBUILDTOPDIR; if [ -f ${HOME}/.rpmmacros ]; then export RPMBUILDTOPDIR=`grep _topdir ${HOME}/.rpmmacros|awk '{print $$2}'`; else export RPMBUILDTOPDIR=/usr/src/redhat; fi; echo $${RPMBUILDTOPDIR};)

.PHONY: rpm

rpm: @[email protected]
$(RM) ${RPMBUILDTOPDIR}/SOURCES/$(distdir).tar.gz
$(RM) ${RPMBUILDTOPDIR}/SPECS/@[email protected]
$(LN_S) `pwd`/$(distdir).tar.gz ${RPMBUILDTOPDIR}/SOURCES
$(LN_S) `pwd`/@[email protected] ${RPMBUILDTOPDIR}/SPECS
rpmbuild -ba ${RPMBUILDTOPDIR}/SPECS/@[email protected]

CLEANFILES = *~ *.log *.tar.gz
14 changes: 8 additions & 6 deletions rpm/libucd.spec → rpm/libucd.spec.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
%global commit 872e0950ccaced127fe91a49d19ebf6348b083f9
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global shortname cpp-libucd
%global shortcommit @VERSION@
%global shortname @PACKAGE@

Name: libucd
Version: 1.0.0
Release: 1.git%{shortcommit}%{?dist}
Version: %{shortcommit}
Release: 1
Summary: Mozilla's Universal Charset Detector C/C++ API
Summary(ko): 모질라 유니버샬 캐릭터셋 디텍트 라이브러리
Summary(zh): Mozilla 字符集检测 C/C++ API
Expand All @@ -30,7 +30,7 @@ Summary(ko): %{name} 를 이용하여 개발하기 위한 header 파일과
Summary(zh): %{name} 的开发用库文件
Group: Development/Libraries
#Requires: pkgconfig
Requires: %{name}%{_isa} = %{version}-%{release}
Requires: %{name}%{_isa} = %{version}-%{release}

%description devel
The %{name}-devel package contains libraries and header files for
Expand All @@ -45,7 +45,8 @@ touch TODO Copyright
%configure \
--enable-debug=no \
--enable-static \
--enable-shared=no
--enable-shared=no \
--disable-icu

make %{_smp_mflags}
gzip -9 ChangeLog
Expand Down Expand Up @@ -86,6 +87,7 @@ rm -fr %{buildroot}
#%{_libdir}/*.sh
%{_includedir}/*
%{_libdir}/pkgconfig/%{name}.pc
%{_bindir}/ucd
#/usr/share/doc/%{name}/html

%changelog
Expand Down

0 comments on commit 33b534a

Please sign in to comment.