Only by taxing the selling company's owner... the Pakistan Air Force, on the profits.
Pakistan Aeronautical Complex reached an agreement with the Republic of Iraq for the sale of 12 PAC JF-17 Thunder Block III 4.5 generation multirole fighter aircraft.
Pakistan Aeronautical Complex
Founded in 1971 by the Pakistan Air Force (PAF), the PAC designs, develops, and builds aircraft and avionics systems for the Pakistani military— it also provides its services for civilian aircraft. In addition, the PAC performs local maintenance and works on the aircraft MLU systems of foreign-built military and civilian aircraft. It is solely owned by the Pakistan Air Force and its corporate interests and its corporate appointments are directly made by the Chief of Air Staff from the Air HQ.
As others have mentioned at times, the Pakistani Armed Forces tend to have their fingers in a lot of business pies. Large scale business ownership by the military would be an unusual arrangement by OECD standards and many would consider it inappropriate (manage businesses or know how to fight wars - pick one).
Now, keep in mind, the ethics also depends on what we are talking about.
If the PAC is selling, in conjunction with the Chinese, new aircraft the Pakistani Air Force (PAF) never owned (i.e. never bought for the PAF by the Pakistani taxpayer), that is one thing - normal profit, by a company that happens to be owned by the armed forces. This seems the case with JF-17, as they are brand new.
If PAF is selling planes (like those F16s which the PAF definitely operated) that were purchased by Pakistan taxpayers and operated by the PAF, and then the PAF pockets all profit, without offsetting any of that against its budget... well, that shows the wise investments the Pakistan Armed Forces make in controlling its civilian governments.