~ubuntu-desktop/gnome-software/ubuntu

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Iain Lane
  • Date: 2018-07-24 16:02:09 UTC
  • Revision ID: iain@orangesquash.org.uk-20180724160209-26uvjjslbrywes84
Moved to git: lp:~ubuntu-desktop/ubuntu/+source/gnome-software

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/make -f
2
 
-include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk
3
 
 
4
 
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
5
 
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
6
 
 
7
 
GS_CONFIGURE_FLAGS = \
8
 
        -Denable-gnome-desktop=true \
9
 
        -Denable-odrs=true \
10
 
        -Denable-ostree=false \
11
 
        -Denable-packagekit=true \
12
 
        -Denable-rpm-ostree=false \
13
 
 
14
 
# these are conditionally re-enabled later
15
 
GS_CONFIGURE_FLAGS += \
16
 
        -Denable-fwupd=false \
17
 
        -Denable-flatpak=false \
18
 
        -Denable-limba=false \
19
 
        -Denable-gudev=false \
20
 
        -Denable-ubuntu-reviews=true \
21
 
        -Denable-valgrind=false
22
 
 
23
 
ifeq ($(DEB_HOST_ARCH_OS), linux)
24
 
        # Enable Flatpak and Limba support on Linux
25
 
        GS_CONFIGURE_FLAGS += -Denable-limba=true -Denable-flatpak=true
26
 
 
27
 
        # Enable GUdev support on Linux
28
 
        GS_CONFIGURE_FLAGS += -Denable-gudev=true
29
 
        
30
 
        # Enable fwupd support on supported architectures
31
 
        ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 arm64 armhf i386))
32
 
                GS_CONFIGURE_FLAGS += -Denable-fwupd=true
33
 
        endif
34
 
 
35
 
        # Enable snap support on supported architectures
36
 
        ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 arm64 armel armhf i386 ppc64 ppc64el s390x))
37
 
                GS_CONFIGURE_FLAGS += -Denable-snap=true
38
 
        endif
39
 
 
40
 
        # Enable valgrind support on supported architectures
41
 
        ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 arm64 armhf i386 mips mips64 mips64el mipsel powerpc ppc64 ppc64el s390x))
42
 
                GS_CONFIGURE_FLAGS += -Denable-valgrind=true
43
 
        endif
44
 
endif
45
 
 
46
 
DISTRO_ID = debian
47
 
FREE_URL = https:\/\/www.debian.org\/social_contract\#guidelines
48
 
ifeq (yes,$(shell dpkg-vendor --derives-from Ubuntu && echo yes))
49
 
        DISTRO_ID = ubuntu
50
 
        FREE_URL = https:\/\/www.ubuntu.com\/about\/about-ubuntu\/licensing
51
 
        GS_CONFIGURE_FLAGS += -Denable-ubuntu-reviews=true
52
 
else ifeq (yes,$(shell dpkg-vendor --derives-from Tanglu && echo yes))
53
 
        DISTRO_ID = tanglu
54
 
else ifeq (yes,$(shell dpkg-vendor --derives-from PureOS && echo yes))
55
 
        DISTRO_ID = pureos
56
 
endif
57
 
 
58
 
# Fix the Flatpak plugin: https://launchpad.net/bugs/1650783
59
 
export DEB_LDFLAGS_MAINT_STRIP := -Wl,-Bsymbolic-functions
60
 
 
61
 
%:
62
 
        dh $@ --with gnome --buildsystem=meson
63
 
 
64
 
override_dh_auto_configure:
65
 
        dh_auto_configure -- --libexecdir=/usr/lib/$(DEB_HOST_MULTIARCH)/gnome-software/ \
66
 
                             $(GS_CONFIGURE_FLAGS)
67
 
 
68
 
override_dh_auto_install:
69
 
        dh_auto_install
70
 
ifneq (yes,$(shell dpkg-vendor --derives-from Ubuntu && echo yes))
71
 
        rm -f debian/tmp/usr/lib/*/gs-plugins-*/libgs_plugin_ubuntu*
72
 
endif
73
 
 
74
 
override_dh_installgsettings:
75
 
        sed 's/@DISTRO@/$(DISTRO_ID)/g' debian/gnome-software.gsettings-override.in > debian/gnome-software.gsettings-override
76
 
        sed -i 's/@URL@/$(FREE_URL)/g' debian/gnome-software.gsettings-override
77
 
        dh_installgsettings
78
 
 
79
 
override_dh_install-arch:
80
 
        # Remove unused files
81
 
        rm -f debian/tmp/usr/lib/*/gs-plugins-*/*.a
82
 
        rm -f debian/tmp/usr/lib/*/gs-plugins-*/*.la
83
 
        rm -f debian/tmp/usr/lib/*/gs-plugins-*/libgs_plugin_fedora*
84
 
        dh_install
85
 
 
86
 
override_dh_missing:
87
 
        dh_missing --fail-missing
88
 
 
89
 
        # These files are split out to separate packages
90
 
        rm -f debian/gnome-software/usr/lib/*/gs-plugins-*/libgs_plugin_flatpak*
91
 
        rm -f debian/gnome-software/usr/lib/*/gs-plugins-*/libgs_plugin_limba*
92
 
        rm -f debian/gnome-software/usr/lib/*/gs-plugins-*/libgs_plugin_snap*
93
 
        rm -f debian/gnome-software/usr/share/metainfo/org.gnome.Software.Plugin.Flatpak.metainfo.xml
94
 
        rm -f debian/gnome-software/usr/share/metainfo/org.gnome.Software.Plugin.Limba.metainfo.xml
95
 
        rm -f debian/gnome-software/usr/share/metainfo/org.gnome.Software.Plugin.Snap.metainfo.xml
96
 
 
97
 
override_dh_makeshlibs:
98
 
        dh_makeshlibs -Xlibgs_plugin
99
 
 
100
 
override_dh_auto_test:
101
 
        # DISABLED
102
 
 
103
 
override_dh_clean:
104
 
        rm -f debian/gnome-software.gsettings-override
105
 
        dh_clean
106
 
 
107
 
# Needed by Ubuntu
108
 
override_dh_translations:
109
 
        ninja -C obj-$(DEB_HOST_GNU_TYPE) gnome-software-pot
110
 
        dh_translations