Skip to content

Commit

Permalink
Fix build: Add new files to Makefile
Browse files Browse the repository at this point in the history
Also remove pip command from spec files and make deb script.

Signed-off-by: Aline Manera <aline.manera@gmail.com>
  • Loading branch information
alinefm committed Dec 4, 2019
1 parent 37f2e98 commit 28384e4
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 10 deletions.
20 changes: 15 additions & 5 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,24 @@ EXTRA_DIST = \
COPYING.LGPL \
CONTRIBUTE.md \
VERSION \
fedora-dev-deps.list \
fedora-runtime-deps.list \
opensuse-leap-dev-deps.list \
opensuse-leap-runtime-deps.list \
ubuntu-dev-deps.list \
ubuntu-runtime-deps.list \
requirements-FEDORA.txt \
requirements-OPENSUSE-LEAP.txt \
requirements-UBUNTU.txt \
build-aux/pkg-version \
config.py.in \
$(NULL)


PEP8_BLACKLIST = *config.py,*i18n.py,*tests/test_config.py

OS_DISTRO=$(shell sed -n -e '/^ID=/p' /etc/os-release | sed 's/ID=//g; s|["'\'']||g')

I18N_FILES = ./i18n.py \
$(NULL)

Expand Down Expand Up @@ -134,11 +145,10 @@ deb: contrib/make-deb.sh
$(top_srcdir)/contrib/make-deb.sh

kimchi.spec: contrib/kimchi.spec.fedora contrib/kimchi.spec.suse
OS_DISTRO=`sed -n -e '/^ID=/p' /etc/os-release | sed 's/ID=//g; s|["'\'']||g'`
@if [[ $OS_DISTRO == "fedora" ]]; then \
ln -sf contrib/wok.spec.fedora $@ ; \
elif [[ $OS_DISTRO == "opensuse-leap" ]]; then \
ln -sf contrib/wok.spec.suse $@ ; \
@if [[ $(OS_DISTRO) == "fedora" ]]; then \
ln -sf contrib/kimchi.spec.fedora $@ ; \
elif [[ $(OS_DISTRO) == "opensuse-leap" ]]; then \
ln -sf contrib/kimchi.spec.suse $@ ; \
else \
echo "Unable to select a spec file for RPM build" ; \
/bin/false ; \
Expand Down
3 changes: 1 addition & 2 deletions contrib/kimchi.spec.fedora.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,14 @@ make
%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
pip3 install -r requirements-FEDORA.tx %{buildroot}


%clean
rm -rf $RPM_BUILD_ROOT

%files
%attr(-,root,root)
%{python_sitelib}/wok/plugins/kimchi/
%{python_sitelib}/*
%{_datadir}/kimchi/doc/
%{_prefix}/share/locale/*/LC_MESSAGES/kimchi.mo
%{_datadir}/wok/plugins/kimchi/
Expand Down
3 changes: 1 addition & 2 deletions contrib/kimchi.spec.suse.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,14 @@ make
%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
pip3 install -r requirements-OPENSUSE-LEAP.txt %{buildroot}


%clean
rm -rf $RPM_BUILD_ROOT

%files
%attr(-,root,root)
%{python_sitelib}/wok/plugins/kimchi/
%{python_sitelib}/*
%{_datadir}/kimchi/doc/
%{_prefix}/share/locale/*/LC_MESSAGES/kimchi.mo
%{_datadir}/wok/plugins/kimchi/
Expand Down
1 change: 0 additions & 1 deletion contrib/make-deb.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,5 @@ fi
TMPDIR=`mktemp -d`

make DESTDIR=$TMPDIR install-deb
pip3 install -r requirements-UBUNTU.txt $TMPDIR
dpkg-deb -b $TMPDIR kimchi-${VERSION}-${RELEASE}.noarch.deb
rm -rf $TMPDIR
4 changes: 4 additions & 0 deletions docs/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@

docdir = $(datadir)/kimchi/doc

EXTRA_DIST = \
deps.md.tmpl \
$(NULL)

all:
@for os_distro in ubuntu fedora opensuse-leap; do \
case $$os_distro in \
Expand Down

0 comments on commit 28384e4

Please sign in to comment.