Skip to content

Commit

Permalink
don't hardcode libexecdir in openvswitch service file
Browse files Browse the repository at this point in the history
once again, a hardcoding of libexecdir that breaks Fedora, so
we need to have the Makefile handle it.
  • Loading branch information
AdamWill committed Apr 26, 2016
1 parent 20a8bf7 commit 5f0ba3d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ CLEANFILES = \
doc/testapi.html

PERL_MODULE = ppmclibs/blib/arch/auto/tinycv/tinycv.so
OPENVSWITCH_SERVICE = systemd/os-autoinst-openvswitch.service

ppmclibs/Makefile: ppmclibs/Makefile.PL
cd ppmclibs && \
Expand All @@ -102,6 +103,11 @@ ppmclibs/Makefile: ppmclibs/Makefile.PL
$(PERL_MODULE): ppmclibs/Makefile
$(MAKE) -C ppmclibs

$(OPENVSWITCH_SERVICE):
rm -f $@ $@.tmp
sed -e 's,@pkglibexecdir[@],$(pkglibexecdir),g' '$(top_srcdir)/$@.in' > '$(top_srcdir)/$@.tmp'
mv '$(top_srcdir)/$@.tmp' '$(top_srcdir)/$@'

install-exec-local: $(PERL_MODULE)
$(MAKE) -C ppmclibs pure_install DESTDIR="$(DESTDIR)" INSTALLDIRS="$(INSTALLDIRS)"

Expand All @@ -110,7 +116,7 @@ all-local: $(PERL_MODULE)
doc/%.html: %.pm
pod2html $< > $@

install-data-local:
install-data-local: $(OPENVSWITCH_SERVICE)
$(MKDIR_P) $(DESTDIR)/$(packagestatedir) ; \
for i in $(packagestate_DATA_FOLDERS) ; do \
cp -r $(top_srcdir)/$$i "$(DESTDIR)/$(packagestatedir)" ; \
Expand All @@ -120,7 +126,7 @@ install-data-local:
cp -r $(top_srcdir)/$$i "$(DESTDIR)/$(pkglibexecdir)" ; \
done
install -D -m 644 $(top_srcdir)/etc/dbus-1/system.d/org.opensuse.os_autoinst.switch.conf "$(DESTDIR)/etc/dbus-1/system.d/org.opensuse.os_autoinst.switch.conf"
install -D -m 644 $(top_srcdir)/systemd/os-autoinst-openvswitch.service "$(DESTDIR)/usr/lib/systemd/system/os-autoinst-openvswitch.service"
install -D -m 644 "$(top_srcdir)/$(OPENVSWITCH_SERVICE)" "$(DESTDIR)/usr/lib/systemd/system/os-autoinst-openvswitch.service"

uninstall-local:
for i in $(packagestate_DATA_FOLDERS) ; do \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Type=dbus
BusName=org.opensuse.os_autoinst.switch
Environment=OS_AUTOINST_USE_BRIDGE=br0
EnvironmentFile=-/etc/sysconfig/os-autoinst-openvswitch
ExecStart=/usr/lib/os-autoinst/os-autoinst-openvswitch
ExecStart=@pkglibexecdir@/os-autoinst-openvswitch

[Install]
WantedBy=multi-user.target

0 comments on commit 5f0ba3d

Please sign in to comment.