[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][xorg-team/app/xdm][debian/latest] debian/rules: Migrate to dh



Title: GitLab

Boyuan Yang pushed to branch debian/latest at X Strike Force / app / xdm

Commits:

  • 88bab510
    by Boyuan Yang at 2024-11-26T00:07:19-05:00
    debian/rules: Migrate to dh
    

1 changed file:

Changes:

  • debian/rules
    1 1
     #!/usr/bin/make -f
    
    2
    -# debian/rules for the Debian xdm package.
    
    3
    -# Copyright © 2004 Scott James Remnant <scott@netsplit.com>
    
    4
    -# Copyright © 2005 Daniel Stone <daniel@fooishbar.org>
    
    5
    -# Copyright © 2005 David Nusinow <dnusinow@debian.org>
    
    6
    -# Copyright © 2006 Eugene Konev <ejka@imfi.kspu.ru>
    
    7
    -
    
    8 2
     # Uncomment this to turn on verbose mode.
    
    9 3
     #export DH_VERBOSE=1
    
    10 4
     
    
    5
    +export DEB_BUILD_MAINT_OPTIONS = "hardening=+pie,+bindnow"
    
    6
    +
    
    11 7
     # set this to the name of the main shlib's binary package
    
    12 8
     PACKAGE = xdm
    
    13 9
     
    
    ... ... @@ -32,76 +28,24 @@ confflags += \
    32 28
     	--disable-silent-rules \
    
    33 29
     	$(NULL)
    
    34 30
     
    
    35
    -# Temp fix for https://bugs.debian.org/1075656
    
    36
    -configure_vars = $(shell DEB_BUILD_MAINT_OPTIONS="hardening=+pie,+bindnow" DEB_CFLAGS_MAINT_APPEND="-Wall -fpermissive" dpkg-buildflags --export=configure)
    
    37
    -
    
    38
    -ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    
    39
    -	NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    
    40
    -	MAKEFLAGS += -j$(NUMJOBS)
    
    41
    -endif
    
    42
    -
    
    43
    -DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
    
    44
    -DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
    
    45
    -DEB_BUILD_ARCH_OS  ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
    
    46
    -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
    
    47
    -
    
    48
    -ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
    
    49
    -	confflags += --build=$(DEB_HOST_GNU_TYPE)
    
    50
    -else
    
    51
    -	confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
    
    52
    -endif
    
    53
    -
    
    54
    -ifeq ($(DEB_BUILD_ARCH_OS), linux)
    
    55
    -	confflags += --with-selinux
    
    56
    -endif
    
    57
    -
    
    58
    -ifneq ($(DEB_BUILD_ARCH_OS), hurd)
    
    59
    -	confflags += --with-default-vt=vt7
    
    60
    -endif
    
    61
    -
    
    62
    -BUILD_DIR := build
    
    63
    -
    
    64
    -stampdir_targets+=config
    
    65
    -config: $(STAMP_DIR)/config
    
    66
    -$(STAMP_DIR)/config: $(STAMP_DIR)/patch
    
    67
    -	dh_testdir
    
    68
    -	autoreconf -vfi
    
    69
    -	>$@
    
    31
    +%:
    
    32
    +	dh $@
    
    70 33
     
    
    71
    -build-arch: build
    
    72
    -
    
    73
    -stampdir_targets+=build
    
    74
    -build: $(STAMP_DIR)/build
    
    75
    -$(STAMP_DIR)/build: $(STAMP_DIR)/prepare $(STAMP_DIR)/config
    
    76
    -	dh_testdir
    
    77
    -	mkdir -p $(BUILD_DIR)
    
    78
    -	cd $(BUILD_DIR) && \
    
    79
    -	../configure \
    
    80
    -	            $(confflags) \
    
    81
    -		    $(configure_vars) \
    
    34
    +override_dh_auto_configure:
    
    35
    +	dh_auto_configure -- \
    
    82 36
     		    APP_MAN_SUFFIX=1 \
    
    83 37
     		    DEF_USER_PATH="/usr/local/bin:/usr/bin:/bin:/usr/games" \
    
    84
    -		    DEF_SYSTEM_PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    
    85
    -	cd $(BUILD_DIR) && $(MAKE)
    
    86
    -	>$@
    
    87
    -
    
    88
    -stampdir_targets+=install
    
    89
    -install: $(STAMP_DIR)/install
    
    90
    -$(STAMP_DIR)/install: $(STAMP_DIR)/build $(STAMP_DIR)/genscripts
    
    91
    -	dh_testdir
    
    92
    -	dh_testroot
    
    93
    -	dh_prep
    
    94
    -	dh_installdirs
    
    95
    -
    
    96
    -	cd $(BUILD_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
    
    38
    +		    DEF_SYSTEM_PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \
    
    39
    +		    $(confflags) \
    
    40
    +			$(NULL)
    
    97 41
     
    
    42
    +execute_after_dh_auto_install:
    
    98 43
     	install -m 755 debian/local/Xstartup \
    
    99 44
     	               debian/tmp/etc/X11/xdm/
    
    100 45
     	install -m 755 debian/local/Xreset \
    
    101 46
     	               debian/tmp/etc/X11/xdm/
    
    102 47
     	install -m 755 debian/local/Xsetup \
    
    103 48
     	               debian/tmp/etc/X11/xdm/
    
    104
    -
    
    105 49
     	install -m 644 debian/local/xdm.options \
    
    106 50
     	               debian/tmp/etc/X11/xdm/
    
    107 51
     	install -d debian/tmp/usr/share/man/man5
    
    ... ... @@ -114,44 +58,9 @@ $(STAMP_DIR)/install: $(STAMP_DIR)/build $(STAMP_DIR)/genscripts
    114 58
     	install -d debian/tmp/etc/insserv.conf.d
    
    115 59
     	install -m 644 debian/xdm.insserv \
    
    116 60
     	               debian/tmp/etc/insserv.conf.d/xdm
    
    117
    -	>$@
    
    118
    -
    
    119
    -clean: xsfclean
    
    120
    -	dh_testdir
    
    121
    -	rm -rf $(BUILD_DIR)
    
    122
    -	rm -f aclocal.m4 compile config.guess config.sub config.h.in configure
    
    123
    -	rm -f depcomp install-sh ltmain.sh missing INSTALL
    
    124
    -	rm -f m4/lt*.m4 m4/libtool.m4
    
    125
    -	rm -f $$(find -name Makefile.in)
    
    126
    -	dh_clean
    
    127
    -
    
    128
    -# Build architecture-dependent files here.
    
    129
    -binary-arch: $(STAMP_DIR)/install
    
    130
    -	dh_testdir
    
    131
    -	dh_testroot
    
    132
    -
    
    133
    -	dh_installdocs
    
    134
    -	dh_install --sourcedir=debian/tmp
    
    135
    -	dh_installchangelogs ChangeLog
    
    136
    -	dh_installinit --noscripts
    
    137
    -	dh_installdebconf
    
    138
    -	dh_installlogrotate
    
    139
    -	dh_installpam
    
    140
    -	dh_link
    
    141
    -	dh_strip
    
    142
    -	dh_compress
    
    143
    -	dh_fixperms
    
    144
    -	dh_missing
    
    145
    -	dh_installdeb
    
    146
    -	dh_shlibdeps
    
    147
    -	dh_gencontrol
    
    148
    -	dh_md5sums
    
    149
    -	dh_builddeb
    
    150
    -
    
    151
    -# Build architecture-independent files here.
    
    152
    -binary-indep: $(STAMP_DIR)/install
    
    153
    -# Nothing to do
    
    154
    -
    
    155
    -binary: binary-indep binary-arch
    
    156 61
     
    
    157
    -.PHONY: build install clean binary binary-indep binary-arch
    62
    +# Extra binary-arch sequences to check:
    
    63
    +# dh_installinit
    
    64
    +# dh_installdebconf
    
    65
    +# dh_installlogrotate
    
    66
    +# dh_installpam


  • Reply to: