Skip to content

Commit de7e072

Browse files
klemensnmrts
authored andcommitted
Linux, BSD: Add BUNDLE_XPI option
The official Debian package includes this file, but other systems do not neccessarily need it; at least OpenBSD is unable to download files from the intenet during packaging, so this fails ether way. Signed-off-by: Klemens Nanni <[email protected]>
1 parent dcb38be commit de7e072

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

debian/rules

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/make -f
22
include /usr/share/cdbs/1/rules/debhelper.mk
33
include /usr/share/cdbs/1/class/cmake.mk
4+
DEB_CMAKE_EXTRA_FLAGS = \
5+
-DBUNDLE_XPI=ON
46
DEB_MAKE_CHECK_TARGET = test

src/app/CMakeLists.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,11 @@ elseif(APPLE)
162162
)
163163
endif()
164164
else()
165+
option(BUNDLE_XPI "Download and bundle the Firefox extension" OFF)
165166
include(GNUInstallDirs)
166-
file(DOWNLOAD ${FIREFOX_URL} ${CMAKE_CURRENT_BINARY_DIR}/${FIREFOX_UUID}.xpi)
167+
if (BUNDLE_XPI)
168+
file(DOWNLOAD ${FIREFOX_URL} ${CMAKE_CURRENT_BINARY_DIR}/${FIREFOX_UUID}.xpi)
169+
endif()
167170
set(WEBEID_PATH ${CMAKE_INSTALL_FULL_BINDIR}/web-eid)
168171
install(TARGETS web-eid DESTINATION ${CMAKE_INSTALL_BINDIR})
169172
if(EXISTS "/etc/debian_version")
@@ -179,8 +182,10 @@ else()
179182
DESTINATION ${CMAKE_INSTALL_DATADIR}/google-chrome/extensions)
180183
install(FILES ${CMAKE_SOURCE_DIR}/install/web-eid.desktop
181184
DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
182-
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${FIREFOX_UUID}.xpi
183-
DESTINATION ${CMAKE_INSTALL_DATADIR}/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384})
185+
if (BUNDLE_XPI)
186+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${FIREFOX_UUID}.xpi
187+
DESTINATION ${CMAKE_INSTALL_DATADIR}/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384})
188+
endif()
184189
foreach(RES 16 32 128 256 512)
185190
install(
186191
FILES ${CMAKE_SOURCE_DIR}/install/appicon_${RES}.png

0 commit comments

Comments
 (0)