I look at the question as "can it be done"...
The questions of "should it be done" and "is it legal" are different questions, and not what was asked.
Before the modern era of .50BMG rifles, I saw a .50BMG single shot"rifle" made from an M2HB barrel. The machinegun barrel was "stock", had not been turned down at all. A scope was mounted on the barrel, and the barrel was mounted on a tripod, with a homemade looking T&E system. The "action" was a cube shaped block that screwed onto the barrel after you inserted the round. The breechblock had a firing mechanism in it, and a trigger that stuck down from the bottom.
I have no idea if it was accurate, or even safe, but having fired the M2HB that "rifle" would have to be securely fastened to something sturdy!
I mention this as an example of what
can be done.
if a super power invades you island the best possible thing you can do is to comply or escape.
I'd like to point out that the Philippines
were in that position, within living memory. And a great many brave men and women neither complied nor escaped.
And I am in need of a single-shot, big-bore, long-range rifle that is home-makeable with little or no proprietary firearms-making tools.
Preferrable caliber is 20mm or more. Cartridge must be homemade as well
No mention was made of explosive projectiles. He's looking for a large bore bullet. Today, we generally define a gun as a cannon, by its ability to fire an explosive shell, rather than strictly by bore size. (common military definition. Legal definitions can be much different)
So to sum it up, with the level of technology you are talking about you could make a 20mm smoothbore or rifled cannon, but you would be getting 1880s level of ballistics, not exactly a good anti material or long range anti-personnel weapon system.
As long as you are looking at homemade ammunition (including powder), this is a very accurate summation. However, even a accurate black powder "cannon" can be effective, if not as effective as something more "modern".
Something else to consider, since you are looking at a single shot, why not a muzzleloader?