Skip to content

Commit

Permalink
Updates to handle the evdi devel branch name changing to main
Browse files Browse the repository at this point in the history
The `evdi` project has changed the branch from `devel` to `main`. This commit
updates all references in the README and Makefile. There is still a `devel`
target, in an attempt not to break others who are using this repo for their
builds.

Signed-off-by: Michael L. Young <[email protected]>
  • Loading branch information
elguero committed Mar 9, 2024
1 parent 3689b4f commit 93fcc44
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 24 deletions.
37 changes: 19 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ SPEC_FILE := displaylink.spec

# The following is a little clunky, but we need to ensure the resulting
# tarball expands the same way as the upstream tarball
EVDI_DEVEL_BRANCH := devel
EVDI_DEVEL_REPO := https://github.com/DisplayLink/evdi.git
EVDI_DEVEL_BASE_DIR := /var/tmp
EVDI_DEVEL := $(EVDI_DEVEL_BASE_DIR)/evdi-$(VERSION)
EVDI_MAIN_BRANCH := main
EVDI_MAIN_REPO := https://github.com/DisplayLink/evdi.git
EVDI_MAIN_BASE_DIR := /var/tmp
EVDI_MAIN := $(EVDI_MAIN_BASE_DIR)/evdi-$(VERSION)

BUILD_DEPS := $(DAEMON_PKG) $(SPEC_FILE)
BUILD_DEPS_GITHUB_EVDI := $(DAEMON_PKG) $(EVDI_PKG) $(SPEC_FILE)
Expand Down Expand Up @@ -59,8 +59,8 @@ define get_release_version
echo -e "$(RELEASE)" | tr -d '[:space:]'
endef

define get_devel_date
curl -s $(EVDI_GITHUB)/branches/devel \
define get_main_date
curl -s $(EVDI_GITHUB)/branches/main \
-H "Accept: application/vnd.github.full+json" |\
grep date | head -1 | cut -d: -f 2- |\
sed s/[^0-9TZ]//g
Expand All @@ -70,7 +70,7 @@ endef
# PHONY targets
#

.PHONY: all github rpm srpm rpm-github srpm-github devel rawhide clean clean-rawhide clean-mainline clean-all versions
.PHONY: all github rpm srpm rpm-github srpm-github devel main rawhide clean clean-rawhide clean-mainline clean-all versions

all: $(TARGETS)

Expand All @@ -85,27 +85,28 @@ rpm-github: $(i386_RPM_GITHUB_EVDI) $(x86_64_RPM_GITHUB_EVDI)

srpm-github: $(SRPM_GITHUB_EVDI)

# Pull latest code from devel branch
devel: $(EVDI_DEVEL)
cd $(EVDI_DEVEL) && git pull
tar -z -c -f $(EVDI_PKG) -C $(EVDI_DEVEL_BASE_DIR) evdi-$(VERSION)
# Pull latest code from main branch
devel: main
main: $(EVDI_MAIN)
cd $(EVDI_MAIN) && git pull
tar -z -c -f $(EVDI_PKG) -C $(EVDI_MAIN_BASE_DIR) evdi-$(VERSION)

# Change release version for running on Fedora Rawhide
rawhide:
@echo Checking last upstream commit date...
$(MAKE) RELEASE="`$(get_release_version)`.rawhide.`$(get_devel_date)`" devel github-release
$(MAKE) RELEASE="`$(get_release_version)`.rawhide.`$(get_main_date)`" main github-release

clean-rawhide:
@echo Checking last upstream commit date...
$(MAKE) RELEASE="`$(get_release_version)`.rawhide.`$(get_devel_date)`" clean-mainline
$(MAKE) RELEASE="`$(get_release_version)`.rawhide.`$(get_main_date)`" clean-mainline

clean-mainline:
rm -rf $(TARGETS) $(EVDI_DEVEL) $(EVDI_PKG)
rm -rf $(TARGETS) $(EVDI_MAIN) $(EVDI_PKG)

clean: clean-mainline clean-rawhide

clean-all:
rm -rf i386/*.rpm x86_64/*.rpm displaylink*.src.rpm $(EVDI_PKG) $(EVDI_DEVEL)
rm -rf i386/*.rpm x86_64/*.rpm displaylink*.src.rpm $(EVDI_PKG) $(EVDI_MAIN)

# for testing our version construction
versions:
Expand All @@ -115,15 +116,15 @@ versions:
@echo Checking upstream version...done
@echo
@echo Checking last upstream commit date...
@devel_date=`$(get_devel_date)` && echo DEVEL_DATE: $$devel_date
@main_date=`$(get_main_date)` && echo MAIN_DATE: $$main_date
@echo Checking last upstream commit date...done

#
# Real targets
#

$(EVDI_DEVEL):
git clone --depth 1 -b $(EVDI_DEVEL_BRANCH) $(EVDI_DEVEL_REPO) $(EVDI_DEVEL)
$(EVDI_MAIN):
git clone --depth 1 -b $(EVDI_MAIN_BRANCH) $(EVDI_MAIN_REPO) $(EVDI_MAIN)

$(DAEMON_PKG):
wget --no-verbose -O $(DAEMON_PKG) \
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ build. This can leave you in a situation where you cannot upgrade your kernel
without sacrificing your displaylink devices. This is not great if the new
kernel has important security or performance fixes.

The evdi developers use the `devel` branch as their main branch for all changes.
The evdi developers use the `main` branch as their main branch for all changes.

To pull the latest code from the `devel` branch and use it to build, do the
To pull the latest code from the `main` branch and use it to build, do the
following:

``` bash
Expand All @@ -121,19 +121,19 @@ make devel
make github-release
```

Of course this `devel` branch will also include some experimental and less
Of course this `main` branch will also include some experimental and less
tested changes that may break things in other unexpected ways. So you should
prefer the mainline build if it works, but if it breaks, you have the option of
making a `devel` build.
making a `main` build.

If you are using Fedora Rawhide, you can create a build which will automatically
download from the `devel` branch and build by running:
download from the `main` branch and build by running:

``` bash
make rawhide
```

> In the past, code in the `devel` branch would be tagged and that version is what
> In the past, code in the `main` branch would be tagged and that version is what
> would be included in the Displaylink driver package.
>
> Recently, we are seeing newer changes appear in the Displaylink driver package
Expand Down

0 comments on commit 93fcc44

Please sign in to comment.